Text-Function - German Format

Hi,

I have a problem with TEXT()-Function when using the German format for a date like TEXT(A1,"TT.MM.JJJJ").

Although setting Language and Region to German before calling CalculateFormula() on the workbook, only english format like "DD.MM.YYYY" work correctly.

Am I missing something or is there a bug?

Thx

Tim

Hi Tim,

Thanks for considering Aspose.

Well yes, there is a problem with Workbook.CalculateFormula() method related to German Format in the Text() function. We will resolve it and response you soon.

Thanks for your patience.

Regards

Amjad Sahi

Aspose Nanjing Team

Hi Tim,

Please try this attached version. If it still doesn't work on your machine, please tell me the result of following line of code in your machine:

Console.WriteLine(DateTime.Now.ToString("TT.MM.JJJJ");

Thank you.

Hi,

unfortunately the problem still exists.

If I run your line of code, I get : TT.11.JJJJ

The language of the format should be independent from the running system. Because Excel files might have been created on another one with different settings. It should depend on Language or Region property of the Excel-Document.

Can this somehow be fixed?

Thx

Tim

Hi Tim,

Is it possible to change your format string to "DD.MM.YYYY"?

We developed Aspose.Cells with MS Excel english version. In my machine, it doesn't accept "TT.MM.JJJJ" format string. And I tried to use your string to format DateTime value in .NET and get the same result as yours: TT.11.JJJJ.

Since I don't have a German XinXP. Could you please help me to fix this issue? Do you know how to format a string from DateTime value as the format "TT.MM.JJJJ"?

The problem is that the excel files are generated by users with german excel versions. So it is not possible to use DD.MM.YYYY.

So here is a quick translation of formatings (english - german)

DD - TT

MM - MM

YYYY - JJJJ

HH - HH

mm - mm

May be u can just translate the format pattern when the formating is done and language of excel doc is German.

Thx

Tim

OK. I will try to make it. Hopefully it will be available in about 2 days.

Hi Tim,

Please try this attached version.

It works!

Thanks a lot