Back to Devexpress

DocumentOptions.Culture Property

officefileapi-devexpress-dot-spreadsheet-dot-documentoptions-36e1b5b9.md

latest6.5 KB
Original Source

DocumentOptions.Culture Property

Obtains culture-specific settings of the spreadsheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public CultureInfo Culture { get; set; }
vb
Public Property Culture As CultureInfo

Property Value

TypeDescription
CultureInfo

A CultureInfo object that specifies culture settings currently being used.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Culture
ISpreadsheetComponent

.Options .Culture

|

Remarks

The Culture affects the following workbook elements:

  • Function names
  • Argument separators in formulas (including calculated fields in pivot tables)
  • Decimal separators for numeric cell content
  • Date and time formats

The following code snippets (auto-collected from DevExpress Examples) contain references to the Culture property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/MainWindow.xaml.cs#L73

csharp
IWorkbook workbook = spreadsheetControl1.Document;
workbook.Options.Culture = defaultCulture;
bool loaded = workbook.LoadDocument("Document.xlsx");

wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/MainWindow.xaml.cs#L66

csharp
IWorkbook workbook = spreadsheetControl1.Document;
workbook.Options.Culture = defaultCulture;
bool loaded = workbook.LoadDocument("PivotTableTemplate.xlsx");

winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/Form1.cs#L131

csharp
IWorkbook workbook = spreadsheet.Document;
workbook.Options.Culture = defaultCulture;
bool loaded = workbook.LoadDocument("Document.xlsx");

winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L119

csharp
IWorkbook workbook = spreadsheet.Document;
workbook.Options.Culture = defaultCulture;
bool loaded = workbook.LoadDocument("Documents\\PivotTableTemplate.xlsx");

winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/Form1.cs#L131

csharp
{
    workbook.Options.Culture = System.Globalization.CultureInfo.CurrentCulture;
    LoadDocumentFromFile();

wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/MainWindow.xaml.vb#L77

vb
Dim workbook As IWorkbook = spreadsheetControl1.Document
workbook.Options.Culture = defaultCulture
Dim loaded As Boolean = workbook.LoadDocument("Document.xlsx")

wpf-spreadsheet-pivot-table-api-examples/VB/SpreadsheetWPFPivotTableExamples/MainWindow.xaml.vb#L66

vb
Dim workbook As IWorkbook = spreadsheetControl1.Document
workbook.Options.Culture = defaultCulture
Dim loaded As Boolean = workbook.LoadDocument("PivotTableTemplate.xlsx")

winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L127

vb
Dim workbook As IWorkbook = spreadsheet.Document
workbook.Options.Culture = defaultCulture
Dim loaded As Boolean = workbook.LoadDocument("Document.xlsx")

winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L113

vb
Dim workbook As IWorkbook = spreadsheet.Document
workbook.Options.Culture = defaultCulture
Dim loaded As Boolean = workbook.LoadDocument("Documents\PivotTableTemplate.xlsx")

winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/Form1.vb#L119

vb
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
    workbook.Options.Culture = System.Globalization.CultureInfo.CurrentCulture
    LoadDocumentFromFile()

See Also

DocumentOptions Class

DocumentOptions Members

DevExpress.Spreadsheet Namespace