PDFConvertor Culture support

Hello

Is it possible to support cultures different than set up on the PC for conversion Excel to pdf?

For example:

If server has "En-Us" culture and client has "It-it" culture then in case sending xls and pdf files from the server client will see Date in different formats by default. XLS will how date in  "It-it"  but pdf in "En-Us".

Is it possible to set which culture should be used during xls to pdf conversion by Flexcel ?

Thanks.

Hi,

Yes, you can specify the culture by setting the thread culture. For example:


Note that this only applies to pdf files, xls files will be shown in the culture Excel is set. There is no information in an xls/x file about the culture that will be used, so it is always used what the user sets in his Excel or windows preverences. On the other hand, a pdf is more like an image, where you can draw "," or "." as you want, and this is what will be displayed. FlexCel fully supports different cultures and it is heavily tested with different ones.

Hello Adrian

Thank You.


Hello TMSsoftware Team,

i have a similar problem with the pdf export. In my case the working thread uses the "de-DE" culture and the operation system, too. In the xlsx templatefile are some number fields, which are formated by Excel function i.e.TEXT(Q43;"0,00"). As result in the excelfile i get for example 0,02 and in the pdf file 002. Fuhterthemore all my date fields are displayed like 31,5,2010 15:13 instead of 31.05.2010 15:13.
It seems that Flexcel uses the wrong culture for generating the pdf file. The same problem exists when i directly print a report.

Thank you for helping.

I think you have a different problem, and it is using the "Text" function. FlexCel does fully support cultures when exporting to pdf (And we test a lot with them here, in fact, our main development machine isn't in english).


But the Text function is a different thing, because functions in FlexCel are invariant (because if not when you tried to set a formula in a machine with a different locale it wouldn't work).

While you could localize FlexCel formulas, this isn't a good idea. The real solution here is not to use "TEXT" at all, which is an old and deprecated function anyway. To format a cell, just write =Q43 and format the cell as "0,00". This will work fine in every locale because the string "0,00" is saved in a neutral locale. That is, no matter what your settings are, inside the Excel file it will be saved as "0.00", and then depending on the locale, it will be converted to the 0,00 or whatever. But inside a function like =TEXT(..., string), Excel doesn't have the knowledge that this is a formatting string, and it will save it "as is". You will have problems with any Excel which is in a different language, or with FlexCel, that while it uses the locale settings, behaves as if it was an "English Excel".

In short, try not to use TEXT. Format the cells instead, and everything will work fine. 

Hello Adrian,
thank you for the clearification.