Design question : How to process with cells with starting with single quote

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?

Book1
ABC
1FIELD1FIELD2<?xml version="1.0 encoding="utf-8"?>
2test1<FIELD1="test1" FIELD2="">
3test2comment Here is my code<FIELD1="test2" FIELD2="comment Here is my code">
4In cell C3 I miss the single quote for comment
5
6BUT PASTED IN NOTEPAD : <?xml version="1.0 encoding="utf-8"?> <FIELD1="test1" FIELD2=""> "<FIELD1=""test2"" FIELD2=""comment Here is my code"">"
7BUT IT SHOUL LOOK LIKE :<?xml version="1.0 encoding="utf-8"?>
8<FIELD1="test1" FIELD2="">
9<FIELD1="test2" FIELD2="comment
10Here is my code">"
Sheet1
Cell Formulas
RangeFormula
C1C1="<?xml version="&""""&"1.0"&" encoding="&""""&"utf-8"&""""&"?>"
C2:C3C2="<FIELD1="&""""&A2&""""&" FIELD2="&""""&B2&""""&">"
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,701
Messages
6,126,289
Members
449,308
Latest member
VerifiedBleachersAttendee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top