Cell format with space has '\' in Excel

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
coheris
Posts: 23
Joined: Fri Feb 16, 2018 4:24 pm

Cell format with space has '\' in Excel

Post 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)
Last edited by coheris on Tue Mar 12, 2019 8:28 am, edited 1 time in total.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

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

Post 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.
Lars Arvidsson, Axolot Data
coheris
Posts: 23
Joined: Fri Feb 16, 2018 4:24 pm

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

Post 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\€
Post Reply