Posted 8 September 2017, 1:16 pm EST
In the attached VS.Net project, CodeDemo.xls file (stored in \bin\debug directory) is formatted using number formatting - the type of formatting applied is explained in excel file. The application can load this excel file to spread control in different culture formats by using culture combo box and “Load” button. It can be seen that the spread control correctly displays the data based on the culture chosen in the combo box i.e., if “US culture” is selected then dot (“.”) is used as a decimal separator and if “Swedish culture” is used then it displays the decimal separator as comma (“,”).
Now, the above works perfectly, however if we serialize the object (by clicking on “Serialize” button) and change the culture (lets say from “US” to “Swedish) and reload the serialized SheetView object (by clicking on “Deserialize” button) the data that is displayed seem to be having inconsistent format. It can be seen that in the SheetView B1 and B2 cells are correctly displaying the data based on the current culture, however B3 cell seems to have wrong decimal separator. Why is this inconsistency? Could this be a bug? Please suggest.
Note: 1) Change the attachment name from "FarPoint-NumberFormat.jpg" to "FarPoint-NumberFormat.zip".
2) The B3 cell in the excel file is exclusively formatted to have 3 decimal places, and it seems to be contributing to the problem. Also, the B3 cell in SheetView when analyzed in the debugger seem to be having a kind of overloaded CultureInfo object, I do not understand why, my intension was just to have more decimal places for B3 cell.
Thanks in advance,