Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Created Unassigned: AddConditionalFormat() does not localize properly for French [9466]

$
0
0
I am using conditional formatting and it works great with my U.S. settings. When I try to localize my application, the conditional formatting in the translated spreadsheets works great for Italian and German, but in French the conditional formatting is incorrect.

The AddConditionalFormat().WhenEqualOrLessThan() methods do not work correctly when the locale is French. It adds quotes to the conditional statement. When I open it in Excel the Rule looks like:

Cell Value <= "-98.00002"

It is supposed to be:

Cell Value <= -98.00002

In the case of French localization, the extraneous quotes are added, but not the the Italian and German cases.

Following is my actual code:

ws.Range(r, 1, r, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.General;

__ws.Cell(r, 2).AddConditionalFormat().WhenEqualOrLessThan(-98.00002f). Font.SetFontColor(XLColor.LightGray);__

ws.SheetView.FreezeRows(2);
ws.Columns().AdjustToContents();

Any idea what could be causing this error?

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>