Description |
---|
...
Wiki Markup |
---|
{description} {excerpt} Gets or sets the culture information to be used to convert the numeric strings such as currencies and formatted numerals in the imported data to numbers. By default it is set to {{System.Globalization.CultureInfo.InvariantCulture}}. This property setting will take effect only if the [ConvertStrings|DataImportProperties.ConvertStrings] property is set to {{true |
...
Signature | ||
---|---|---|
C# | C# | }}.
{excerpt}
{signature:C#}
public System.Globalization.CultureInfo ConversionCulture { get; set; }
|
Signature | ||
{signature} {signature:vb.net | vb.net | }
Public Property ConversionCulture() As System.Globalization.CultureInfo
|
Exceptions |
---|
Exception | |||
---|---|---|---|
ArgumentException | ArgumentException | When the ConversionCulture property is set to null (C#) or Nothing {signature} {exceptions} {exception:ArgumentException} When the {{ConversionCulture}} property is set to {{null}} \(C\#\) or {{Nothing}} \(VB.NET\), ExcelWriter will throw this exception. | |
Remarks | |||
By {exception} {remarks} By default, when importing data, ExcelWriter will not convert numeric strings to numbers. If the [ConvertStrings|DataImportProperties.ConvertStrings] property is set to {{true}}, ExcelWriter will parse the strings into a {{decimal}} type by using the culture information specified through the {{ConversionCulture}} property. However if {{ConvertStrings}} is set to {{false}}, the setting of the {{ConversionCulture}} property will not take any effect and the numeric string will not be converted.If ConvertStrings is enabled but no culture is set for the ConversionCulture property, then ExcelWriter will use the invariant culture, If {{ConvertStrings}} is enabled but no culture is set for the {{ConversionCulture}} property, then ExcelWriter will use the invariant culture, {{System.Globalization.CultureInfo.InvariantCulture}}, to parse the numeric strings. | |||
Example | |||
Code Block | | csharp | csharp |
title | C# | ||
Code Block | vb.net | title |