ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dataset to exel issue (https://www.excelbanter.com/excel-programming/333571-dataset-exel-issue.html)

-nk-

dataset to exel issue
 
Hi,
I am transforming a dataset to excel by converting the dataset xml to
html (using xslt) and then opening the html file using the Excel objects and
saving th file. The problem I am having is that data fromthe dataset that
contains multiple spaces (whitespace) in the text is getting truncated to a
single space in the excel file. I looked at the intermediate html file and
the space exists the
<TD border="1" valign="top" xml:space="preserve"
<font size="1"
Respondent 1
</font
Bur when I open the excel file it reduces the multiple spaces to a single
space between the word Respondent and 1. I need to preserve the wihtespace in
the excel file. Any help would be appreciated. Thanks.

nk


Tim Williams

dataset to exel issue
 
n,

HTML does not preserve runs of spaces - they will be compressed to a
single space even if they appear in the source.

Try replacing your spaces with "&nbsp;"

Tim.


"-nk-" wrote in message
...
Hi,
I am transforming a dataset to excel by converting the dataset xml
to
html (using xslt) and then opening the html file using the Excel
objects and
saving th file. The problem I am having is that data fromthe dataset
that
contains multiple spaces (whitespace) in the text is getting
truncated to a
single space in the excel file. I looked at the intermediate html
file and
the space exists the
<TD border="1" valign="top" xml:space="preserve"
<font size="1"
Respondent 1
</font
Bur when I open the excel file it reduces the multiple spaces to a
single
space between the word Respondent and 1. I need to preserve the
wihtespace in
the excel file. Any help would be appreciated. Thanks.

nk





All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com