Hello
Is it possible to export to PDF in a specific culture, apart form setting the own threads culture and resetting it after export?
Samuel
Hi,
Hello
Thank you for your response.
No, there is not a strong reason, why I don't want to change the culture. It's just a matter of taste. You could also change the current threads culture, call .ToString(), and change the culture back. Or you could just use .ToStrong(culture).
Apart from that: I was hoping to solve following problem: When I concatenate Cells containing (double) numbers and cells containing text in the Excel report template, this results in a string which was generated with the current culture.
E.g. Cell A1: Text , cell A2: 2.5, cell A3: =A1&A2. This results in "Text 2,5" for the cell A3 in the final report with the region settings de-DE.
But I'd like to generate the report with InvariantCulture and the workaround with setting the current thread culture to InvariantCulture does not work in this specific situation.
My workaround is now not to concatenate the cells A1 and A2 in cell A3 but to set A3 to A1 and set A4 to A2 and size them that it finally looks like they are concatenated (in the PDF report). May you know a better solution?
Samuel
Samuel
The things with ToString() is that it is a simple method, so it makes sense so offer it both ways. We have something similar with the ActiveSheet: Instead of making every call to have a parameter "sheet", we have a state variable ActiveSheet, which sets the sheet we are working on, and the sheet parameter is implicit. But we do have a xls.SetCellValue(sheet, row, col) in case you want to change a cell value without changing the sheet.
Hello Adrian Gallero
Thank you for your explanation.
Your suggested solution works perfect for me.
Samuel