Hi,
we make use of the SetValueFormText method.
Most of the behavior is equivalent to the parsing behavior in Microsoft Excel. It seems that SetValueFromText does not parse currency. Time strings are parsed differently too.
With the following code snippet you can test this cases:
C#var wb = new Workbook();
wb.CreateNewDocument();
var worksheet = wb.Worksheets[0];
worksheet.Cells[0].SetValueFromText("19.09.2020");
worksheet.Cells[1].SetValueFromText("19.09.2020 08:22");
worksheet.Cells[2].SetValueFromText("19.09.20");
worksheet.Cells[3].SetValueFromText("08:22"); // Excel: 2020-10-01 08:22:00 / DevExpress Spreadsheet: 1899-12-31 08:22:00
worksheet.Cells[8].SetValueFromText("1000 €");
worksheet.Cells[9].SetValueFromText("1000 $");
wb.SaveDocument(@"C:\Temp\Test.xlsx", DocumentFormat.Xlsx);
What do you recommend to parse currency or is this a bug in SetValueFromText?
Regards
Dominik
Hi Dominik,
I didn't notice any issue with a time string. Please illustrate the problem with a screenshot or video.
As for the currency strings, I need additional time to check if it is possible to parse them using our components. I will update this thread once I have any results.
Sorry this was a failure on my side. With time string everything is fine.
Thank you for your clarification. There is no straightforward approach to parse the "1000 €" string using the SetValueFromText method.
I will pass this thread to our developers. They will research if it is possible to extend the SetValueFromText method with this functionality. We will update this ticket once we have any results.
Unless I'm mistaken, the current culture on your machine is set to German. So, the above strings should be parsed according to the German number format settings. Please clarify this point.