Page 1 of 1

Cell format with space has '\' in Excel

Posted: Tue Mar 05, 2019 4:49 pm
by coheris
Hi,

In my custom format cell I have blanc space inside the "formula", for example : "# ##0,00 K€"
When I fo the export, in Excel I get : "# ##0,00\ K\€"
My OS language is french and in Excel the space between 0 and k mean to divide by 1000 the display result.

The problem is the '\' add before the space diplay the wrong number. It seem that XlsReadWrite add it when the xls is created.

Is there a way to disable the addition of '\' during the creation of the xls?

Example:
number 123456
# ##0,00\ K\€ => 123 456 K€
# ##0,00 K\€ => 123,46K€

I am new using XlsReadWrite and it is a code of someone else, but it seem to be passed in CmdFormat.Number.Format after a CmdFormat.BeginEdit

does someone has already had the problem?

Edit: The selection of method is in function of the system locale (in windows => region => format)

Re: Cell format with space has '\' in Excel

Posted: Sat Mar 09, 2019 8:43 am
by larsa
Hello

The format string is correct. Excel shows string literals in format strings by putting a backslash character before the character. XLSReadWriteII don't use the backslash character.

Re: Cell format with space has '\' in Excel

Posted: Tue Mar 12, 2019 8:30 am
by coheris
My problem because the language in my computer is french and the space is needed to to display 1000k of the value.
When I format in Excel I need # ##0,00 K\€