jbesclapez
Active Member
- Joined
- Feb 6, 2010
- Messages
- 275
Hi there,
I have problems with single quotes and can not find a good solution.
I use excel to generate some XML template. Then i will load the XML to another system....
My problem is that I have some cells where it starts with a single quote. The quote is used to comment a line, like in VBA. You can see this in cell B3. And that is where the problem start.
When i insert a quote, excel sees it as a text and then will ignore it...
Then i paste the Range C1 to C3 in a notepad and it also adds double quotes (see minisheet).
How can you solve the single quote issue?
I have problems with single quotes and can not find a good solution.
I use excel to generate some XML template. Then i will load the XML to another system....
My problem is that I have some cells where it starts with a single quote. The quote is used to comment a line, like in VBA. You can see this in cell B3. And that is where the problem start.
When i insert a quote, excel sees it as a text and then will ignore it...
Then i paste the Range C1 to C3 in a notepad and it also adds double quotes (see minisheet).
How can you solve the single quote issue?
Book1 | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | FIELD1 | FIELD2 | <?xml version="1.0 encoding="utf-8"?> | ||
2 | test1 | <FIELD1="test1" FIELD2=""> | |||
3 | test2 | comment Here is my code | <FIELD1="test2" FIELD2="comment Here is my code"> | ||
4 | In cell C3 I miss the single quote for comment | ||||
5 | |||||
6 | BUT PASTED IN NOTEPAD : | <?xml version="1.0 encoding="utf-8"?> <FIELD1="test1" FIELD2=""> "<FIELD1=""test2"" FIELD2=""comment Here is my code"">" | |||
7 | BUT IT SHOUL LOOK LIKE : | <?xml version="1.0 encoding="utf-8"?> | |||
8 | <FIELD1="test1" FIELD2=""> | ||||
9 | <FIELD1="test2" FIELD2="comment | ||||
10 | Here is my code">" | ||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C1 | C1 | ="<?xml version="&""""&"1.0"&" encoding="&""""&"utf-8"&""""&"?>" |
C2:C3 | C2 | ="<FIELD1="&""""&A2&""""&" FIELD2="&""""&B2&""""&">" |