-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong CellFormat Text converts a "30.1" to "30,1" #165
Comments
Hi Alex. I'm afraid I don't have MS Excel to test with, but running the following code using version 2.1.1 results in a value of
Can you please try the result of this code in Excel and report back? |
Hi Julian, |
I don't think the Lucee locale will make any difference, but it's possible your German Excel is treating the value as currency despite the specified "text" format. If you add the value by hand in your Excel sheet and then format it with"@" do you get the same result? |
Could you also try the following?
I'd also recommend upgrading to v2.2.0 which uses a newer version of POI, although I think it's unlikely that's the cause of the problem. |
Both 2.1.1 and 2.2.0 returns for your first example anyway 3,1 as cell value with text @ as cellFormat |
Did you try adding the value manually in your German Excel formatting it as |
Try this, which forces the value to be inserted as a string and then formats it:
|
The value comes from a query and in METADATA I can see, the type is "VARCHAR". |
I've changed my OpenOffice locale to German and I'm seeing the same results as you using the code above. But query VARCHAR values should be added as strings, and this seems to be the case for me even with the German locale:
This produces |
In Version 2.1.1 I detect an issue with cell formatting as text.
My input value is "30.1" and in Excel the Output is "30,1". The Cell in Excel is recordnized as text with Format @.
My formatCell input is
{"rightborder":"hair","textwrap":false,"topborder":"hair","bold":false,"alignment":"right","bottomborder":"hair","leftborder":"hair","verticalAlignment":"top","dataformat":"@","fgcolor":"255, 147, 147"}
The text was updated successfully, but these errors were encountered: