Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unwanted Double Quotes produced by Excel
Hello
I'm using Excel 2003 to generate HTML. It was initially done using formula, but then I converted it to a VBA function. If I paste the generated code straight into a text editor, I get the following "<tr<th scope=""row"" align=""left"" id=""RowCSCG""Credit Suisse Capital Growth</th <td id=""RowCSCG FundSize"" align=""center""18.8</td <td id=""RowCSCG AnnualReturns1Year"" align=""center""14.2%</td <td id=""RowCSCG AnnualReturns3Years"" align=""center""-1.9%</td <td id=""RowCSCG AnnualReturns5Years"" align=""center""-</td</tr " Note all attribute values are enclosed in 2 double quotes and the line itself is also enclosed in double quotes. This results in the page not rendering. To overcome this, I * copy these lines to the clipboard, * switch to an open Word document and run a macro that turns off smart quotes, pastes the text as unformatted text, removes the excess double quotes and before copying to the clipboard, * paste into text editor, * repeat until all sections are completed. I'd like to streamline this process and would like to know if 1. Excel can be prevented from adding the extra double quotes; 2. Failing that, any suggestions as to how this process could be streamlined. One appraoch I have in mind is to define a Word object within an Excel macro that simulates the above tasks. I'm not quite sure how to do this, but will continue to progress down this path. In the meantime, if anyone has a better suggestion or can offer some quick advice, I'd appreciate it. Thank you Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unwanted Double Quotes produced by Excel
Post your VBA code and we can see what might need to be changed.
Cheers Nigel "Mark" wrote in message om... Hello I'm using Excel 2003 to generate HTML. It was initially done using formula, but then I converted it to a VBA function. If I paste the generated code straight into a text editor, I get the following "<tr<th scope=""row"" align=""left"" id=""RowCSCG""Credit Suisse Capital Growth</th <td id=""RowCSCG FundSize"" align=""center""18.8</td <td id=""RowCSCG AnnualReturns1Year"" align=""center""14.2%</td <td id=""RowCSCG AnnualReturns3Years"" align=""center""-1.9%</td <td id=""RowCSCG AnnualReturns5Years"" align=""center""-</td</tr " Note all attribute values are enclosed in 2 double quotes and the line itself is also enclosed in double quotes. This results in the page not rendering. To overcome this, I * copy these lines to the clipboard, * switch to an open Word document and run a macro that turns off smart quotes, pastes the text as unformatted text, removes the excess double quotes and before copying to the clipboard, * paste into text editor, * repeat until all sections are completed. I'd like to streamline this process and would like to know if 1. Excel can be prevented from adding the extra double quotes; 2. Failing that, any suggestions as to how this process could be streamlined. One appraoch I have in mind is to define a Word object within an Excel macro that simulates the above tasks. I'm not quite sure how to do this, but will continue to progress down this path. In the meantime, if anyone has a better suggestion or can offer some quick advice, I'd appreciate it. Thank you Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
when excel save as csv,double quotes in an cell issue | Excel Discussion (Misc queries) | |||
copy/paste excel to texteditor -> multi-line text cells gain unwanted double-quotes | Excel Discussion (Misc queries) | |||
Unwanted Quotes | Excel Discussion (Misc queries) | |||
Can Excel be pre-formatted to apply "double quotes" to data enter. | Excel Worksheet Functions | |||
Double Quotes | Excel Programming |