I am trying to import some results from a SQL query into excel ignoring line breaks.
The results look fine in SQL server
a typical record has the following column extracted from a HTML address
<b>F1 Gran Premio de España Santander<sup style="font-size: 8px">TM</sup> 2013</b><br><span class="smallText">3 Day Entry<br>Grandstand F<br><strong>10% off race day prices! Book now!</strong></span>
when this is imported into excel all the line breaks ruin the formatting…
I have tried this with grid, text and exporting to .rpt file and importing. Any ideas how to ignore the line breaks, thanks ?
there is a possibility to export data for excel in “fiendly” form using “XML Spreadsheet” format. Description can be found here:
http://msdn.microsoft.com/en-us/library/office/aa140066(v=office.10).aspx
If you need only to export data from SSMS then you might find SSMSBoost add-in for SSMS useful in your case.I am developer of this add-in and I have implemented “Export ResultsGrid to Excel” function, that simply scripts ResultsGrid contents as XML Spreadsheet format. (Right click the grid->Script as -> XML Spreadsheet). Hope it helps. (Add-in can be used for free.)
P.S. Scripting engine of SSMSBoost is pretty flexible and you can create your own scripting templates. I have created couple of them and they are installed with add-in: script as “insert”, “select”, “property:value”, “XML”, “XML spreadsheet”, “HTML”.