Hi,
Thanks for your posting and using Aspose.Cells.
We were able to observe this issue by executing your sample code with your source excel file using the latest version: Aspose.Cells
for .NET v8.6.2.2. ExportDataTableAsString is not exporting EN-GB culture date correctly as you have mentioned.
We have therefore logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-44098 - ExportDataTableAsString is not exporting EN-GB culture date correctly
Hi,
Thanks for using Aspose.Cells.
We have looked into this issue further and found you need to set the region before exporting table.
Please see the following sample code for your reference which gives correct output.
C#
Workbook workbook = new Workbook(path + “FutureAppointments.xls”);
workbook.Settings.Region = CountryCode.UnitedKingdom;
Console.WriteLine(workbook.Worksheets[0].Cells[“D138”].DisplayStringValue);
Thanks for the fix.
Hi,
Thanks for sharing your valuable insight and using Aspose.Cells.
It is good to know that the code suggested in the above post works for you. We have also logged your comment in our database for product team consideration. We will look into it and see if your suggested solution could be employed in future versions. Once there is some update for you, we will let you know asap.
Hi,
Thanks for using Aspose.Cells.
We have enhanced the document for WorkbookSettings.Region from release 8.7.2. For your issue, it is because the region saved in your template file is not the default one of the environment. For such kind of template, you have to change the region manually. If the saved region is default or loading template files such as XLSX, XLSB…, we will use the default regional settings of the environment automatically.