Newline character in XML cell reference when creating xlsx from XMLzipped files

I

ian.osullivan

I'm a programmer creating an xlsx file via the generation of all XML files required and zipping them to create the xlsx file. All is working fine but my question is How do I put a newline characgter into a cell in my xml? Every attempt so far only outputs a string.

Thanks
 
A

Auric__

ian.osullivan said:
I'm a programmer creating an xlsx file via the generation of all XML
files required and zipping them to create the xlsx file. All is working
fine but my question is How do I put a newline characgter into a cell in
my xml? Every attempt so far only outputs a string.

A literal newline (\r\n) in the source should do it. Try creating a new
workbook, enter a test string ("foo[ALT+ENTER]bar"), then save the workbook
and view the source outside of Excel. I did so, and got this in Book1.xlsx\xl
\sharedStrings.xml:

Line Data
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
count="1" uniqueCount="1"><si><t>foo
3 bar</t></si></sst>

(Ignore word wrap and pay attention to the line numbers.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top