Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - 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 8:22:00 AM 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. > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
