-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Locale on conditionalcolor scale #520
Labels
Milestone
Comments
I haven't dug deep, but I think that the issue is the following parameterless
|
What's your CultureInfo of the thread? German? |
Yes, So in the above mentioned line
value.ToString() by value.ToString(CultureInfo.InvariantCulture) should ensure the correct format independent of the current culture.
Please note that the line in the getter
double.Parse(cfvo.val, CultureInfo.InvariantCulture) for consistency
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a color scale conditional formatting with explicit numbers, the locale seems to matter and invalid numbers get exported when using e.g. german number format
colorScaleFormatting.Thresholds[0].RangeType = RangeType.NUMBER; colorScaleFormatting.Thresholds[0].Value = -0.3; colorScaleFormatting.Thresholds[1].RangeType = RangeType.NUMBER; colorScaleFormatting.Thresholds[1].Value = 0.0; colorScaleFormatting.Thresholds[2].RangeType = RangeType.NUMBER; colorScaleFormatting.Thresholds[2].Value = 0.3;
Invalid output in the xml:
<conditionalFormatting sqref="E5"> <cfRule type="colorScale" dxfId="0" priority="1" aboveAverage="1"> <colorScale> <cfvo type="num" val="-0,3" gte="1" /> <cfvo type="num" val="0" gte="1" /> <cfvo type="num" val="0,3" gte="1" /> <color indexed="12" /> <color indexed="9" /> <color indexed="10" /> </colorScale> </cfRule> </conditionalFormatting>
The text was updated successfully, but these errors were encountered: