Back to Devexpress

DataImportOptions.ReferenceStyle Property

officefileapi-devexpress-dot-spreadsheet-dot-dataimportoptions-73205a5b.md

latest2.6 KB
Original Source

DataImportOptions.ReferenceStyle Property

Gets or sets whether the reference style is used in data imported as formulas.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public ReferenceStyle ReferenceStyle { get; set; }
vb
Public Property ReferenceStyle As ReferenceStyle

Property Value

TypeDescription
ReferenceStyle

A ReferenceStyle enumeration value which specifies the style of the cell reference.

|

Available values:

NameDescription
UseDocumentSettings

The cell range reference is in the reference style used in the workbook.

| | A1 |

The cell range reference is in the A1 reference style.

| | R1C1 |

The cell range reference is in the R1C1 reference style.

|

Example

View Example

vb
Dim arrayR1C1() As String = { "a", "b", "=R1C1&R1C2" }
worksheet.Import(arrayR1C1, 0, 0, False, New DataImportOptions() With {.ImportFormulas = True, .ReferenceStyle = ReferenceStyle.R1C1})

Dim arrayLocalized() As String = { "a", "=1,2+1" }
worksheet.Import(arrayLocalized, 1, 0, False, New DataImportOptions() With {.ImportFormulas = True, .FormulaCulture = New System.Globalization.CultureInfo("de-DE")})
csharp
string[] arrayR1C1 = new string[] { "a", "b", "=R1C1&R1C2" };
worksheet.Import(arrayR1C1, 0, 0, false, new DataImportOptions() { ImportFormulas = true, ReferenceStyle = ReferenceStyle.R1C1 });

string[] arrayLocalized = new string[] { "a", "=1,2+1" };
worksheet.Import(arrayLocalized, 1, 0, false, 
    new DataImportOptions() { ImportFormulas = true, FormulaCulture = new System.Globalization.CultureInfo("de-DE") });

See Also

DataImportOptions Class

DataImportOptions Members

DevExpress.Spreadsheet Namespace