Exporting to XML Spreadsheet loses cell format for number

P

Paeon

Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hi,
In my Excel doc, I have a column of numbers I want treated as text. I have formatted the cells as text, and save the xls. When I save an XML spreadsheet, and open the xml in my xml editor, the number has been turned back into a real number. The column is a list of ages, so I do NOT want the ages to be 2.0, 3.0, and I'm going to need these to be just an integer because I'm going to transform the xml spreadsheet using xsl.

Please anyway to stop Excel from doing this?
 
J

John McGhie

There's a difference between a "cell formatted as text" and a "cell
CONTAINING text".

If you change the format for a cell to "Text", that does not automatically
re-express the contents of existing cells as text. It simply tells Excel
that anything further typed in that column is to be stored as text.

To convert existing content, you need to format the column the way you want
to see it, then select it all, COPY, then Edit>Paste Special>Values.

When you do that, Excel will re-store the contents of the cell as text
strings, replacing the numbers that are currently in there.

Hope this helps


Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hi,
In my Excel doc, I have a column of numbers I want treated as text. I have
formatted the cells as text, and save the xls. When I save an XML spreadsheet,
and open the xml in my xml editor, the number has been turned back into a real
number. The column is a list of ages, so I do NOT want the ages to be 2.0,
3.0, and I'm going to need these to be just an integer because I'm going to
transform the xml spreadsheet using xsl.

Please anyway to stop Excel from doing this?

--

The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:[email protected]
 

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