Skip to main content

XlCellRange.Parse(String) Method

Returns a XlCellRange object by its reference string in the in the A1 reference style.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public static XlCellRange Parse(
    string reference
)

Parameters

Name Type Description
reference String

A string that specifies the cell range reference in the A1 reference style.

Returns

Type Description
XlCellRange

A XlCellRange object created for the specified reference.

Remarks

If the specified string cannot be parsed, a ArgumentException is thrown.

Tip

To get a cell range by the indexes of the bounding rows and columns, use the XlCellRange.FromLTRB method.

Example

XlExportExamples_Sparklines_DateRange

Note

A complete sample project is available at https://github.com/DevExpress-Examples/excel-export-api-examples

// Create a group of line sparklines.                    
XlSparklineGroup group = new XlSparklineGroup(XlCellRange.Parse("B2:E7"), XlCellRange.Parse("F2:F7"));
// Specify the date range for the sparkline group. 
group.DateRange = XlCellRange.Parse("B1:E1");
// Set the sparkline weight.
group.LineWeight = 1.25;
// Display data markers on the sparklines.
group.DisplayMarkers = true;
sheet.SparklineGroups.Add(group);
See Also