Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - RE: Excel line breaks not working. >Thread Next - Re: Excel line breaks not working. Re: Excel line breaks not working.To: NULL Date: 1/4/2006 4:29:00 PM "Leon Ford" <LeonFord@d...> wrote in message news:3DC180DF-D145-47B9-82D8-4634BFB8DACB@m...... > Ok, now that I know how to get the ampersand to show up in this post, I > will > try again. > > Excel produces this line when I format the item the way I want it and save > as XML, which is what I put into my XSL transformation file. > <Cell ss:StyleID="sHeaders"><Data > ss:Type="String">Contract Value ($M)</Data></Cell> > > How do I get the transformation to produce this line? > > "Leon Ford" wrote: > >> I am doing an XSL transformation of a dataset (using a XmlDataDocument) >> to >> create an Excel XML file. Everything is working fine except that my >> header >> cells are not getting the line breaks like I want. >> >> When I explicitly format the headers in excel the way I want them and >> save >> the file as XML, the line built by excel is: >> >> <Cell ss:StyleID="sHeaders"><Data >> ss:Type="String">Contract >> Value >> ($M)</Data></Cell> >> >> In my XSL transformation file, I have the following line: >> >> <Cell ss:StyleID="sHeaders"><Data >> ss:Type="String">Contract >> Value >> ($M)</Data></Cell> >> >> When I do the transformation and save the XML file, the line produced is >> (note the line wrap): >> >> <Cell ss:StyleID="sHeaders"><Data ss:Type="String">Contract >> Value >> ($M)</Data></Cell> >> >> When this is loaded into excel, the linebreaks are gone and the cell text >> is >> all on the same line. >> >> I have tried putting in the <xsl:preserve-space elements="*"/> into my >> XSL >> transformation file, as well as XmlDataDocument.PreserveWhitespace = True >> prior to doing the transformation in my code. This does not help. >> >> The bottom line, is that I need the final XML file to be exactly as show >> below to have excel load this correctly. >> >> <Cell ss:StyleID="sHeaders"><Data >> ss:Type="String">Contract >> Value >> ($M)</Data></Cell> >> >> >> I am using Office 2003, Windows XP, and Visual Studio 2003. >> Maybe use: <xsl:text>
</xsl:text> in between contract and value. -- Joe Fawcett (MVP - XML) https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
