Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 360
Default converting an .xlsm file to .xml?

how do you save an .xlsm file as .xml?
the excel files are simple files with cells with no calculations.
the records are county property records with some numbers and text.
I thought you could save as .xml previously but I have Excel 2007.
I turned on the Developer tab and export is greyed out?
thanks,

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default converting an .xlsm file to .xml?

You first need to create an XSD schema using your favorite XML editor
(I use XML Spy, which is fantastic), or a text editor like Notepad.
For example, given data on a worksheet like


Groups Number Tens Hundreds
One 1 10 100
Two 2 20 200
Three 3 30 300
Four 4 40 400

I created a schema named TestSchema.xsd as shown below:

<?xml version="1.0" encoding="UTF-8"?
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://www.cpearson.com/test"
xmlns:test="http://www.cpearson.com/test"
<xs:element name="Groups"
<xs:complexType
<xs:sequence
<xs:element name="Group" minOccurs="1"
maxOccurs="unbounded"
<xs:complexType
<xs:sequence
<xs:element name="Title"</xs:element
<xs:element name="Number"</xs:element
<xs:element name="Tens"</xs:element
<xs:element name="Hundreds"</xs:element
</xs:sequence
</xs:complexTyp
</xs:element
</xs:sequence
</xs:complexType
</xs:element
</xs:schema


Then, on the Developer tab in Excel, click the Source button to open
the XML Source task pane. At the bottom of that, click the XML Maps
button and in that dialog, click Add to open your schema xsd file and
click OK. Now, click the top-most element in the XML tree (labelled
Groups in this example), and drag that item to the upper left corner
of the data on the worksheet ("Groups" in the worksheet example
above). Excel will format the table with lots of pretty colors that
you can get rid of by unchecking the "banded rows" checkbox on the
Table Style Options panel. Now, go back to the Developer tab,click
Export, and specify the name of the xml file to which you want to save
the data.

As often as not, I end up just using VBA input/output procedures to
write the raw XML directly to a file rather than jumping through
Excel's hoops.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Fri, 12 Mar 2010 16:11:01 -0800, Janis
wrote:

how do you save an .xlsm file as .xml?
the excel files are simple files with cells with no calculations.
the records are county property records with some numbers and text.
I thought you could save as .xml previously but I have Excel 2007.
I turned on the Developer tab and export is greyed out?
thanks,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open XLSM file in IE9 Manuelauch Excel Discussion (Misc queries) 0 November 9th 09 04:55 PM
Converting xls to xlsm changes some names SteveM Excel Discussion (Misc queries) 1 August 20th 09 04:30 AM
what is xlsm' file Donna Excel Discussion (Misc queries) 2 January 9th 09 02:43 PM
excel 2003 file converted to .xlsm file when save to network drive Chris Excel Discussion (Misc queries) 3 January 23rd 08 02:56 PM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"