Unwanted Double Quotes produced by Excel

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

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
 
Hello,

I am having the same issue, and it is not just in 2003, 2007 and 2010 versions of excel do the same thing. I download an daily inventory report from one of my suppliers, there is a cell that contains an HTML product description. When looking at the cell there is no unwanted quotes, but when you copy and paste straight out of the xlsx sheet or upload the saved as "CSV" to a shopping platform the HTML has added quote marks to very beginning and very end.

<Full HTML Description> comes out: " <Full HTML Description> " and is not a usable description to my cart software.

I will add that if I "double click" the cell, not single click, "double click" the cell and copy and paste the HTML from the formula bar it delivers render-able code? But this does nothing for uploading the sheet to a inventory db. If that helps at all?

I like the idea of manually stripping the cell as described by Mark above, but I have up and around 15,000 to 20,000 SKU's or Description to do daily.

Any help would be greatly appreciated,
Bill
 
Last edited:
Back
Top