Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Creating an xsd to export xls to xml

I have a spreadsheet with a specific format:

B14: Customer No.
B15: Name
B16: Address
B17: City
B18: State
B19: Zip

A20 (header) B20 (header)
Item No. Qty Ordered

A21 ... A100 B21 ... B100
Column of Item Nos Qty of Each Item No ordered

All fields above B14 should be ignored (they are just visual stuff)

I want to create an XSD to this spreadsheet so I can save the document as
xml I can use and import elsewhere

How can I create the xsd so that I can map the spreadsheet? I guess my
question is - what is my next step so that I can save this as xml in the
proper format. I believe I need to create the xsd so I can map this and then
I can export it as xml.

Am I totally off base - or heading in the right direction?

Any help would be greatly appreciated.

Regards,
Diane

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Creating an xsd to export xls to xml

You could use a schema like the following:

<?xml version="1.0" encoding="UTF-8"?
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
targetNamespace="tempuri.com/export"
xmlns:ex="tempuri.com/export"

<xs:complexType name="TOrder"
<xs:sequence
<xs:element name="ItemNumber"</xs:element
<xs:element name="Quantity"</xs:element
</xs:sequence
</xs:complexType

<xs:complexType name="TOrders"
<xs:sequence
<xs:element
name="Order"
type="ex:TOrder"
minOccurs="0"
maxOccurs="unbounded"
</xs:element
</xs:sequence
</xs:complexType

<xs:element name="ExportList"
<xs:complexType
<xs:sequence
<xs:element name="CustomerNumber"/
<xs:element name="Name"/
<xs:element name="Address"/
<xs:element name="City"/
<xs:element name="State"/
<xs:element name="Zip"/
<xs:element name="Orders"
type="ex:TOrders"/
</xs:sequence
</xs:complexType
</xs:element
</xs:schema



This would allow you create an XML file like

<?xml version="1.0" encoding="UTF-8"?
<ex:ExportList xmlns:ex="tempuri.com/export"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="tempuri.com/export Orders.xsd"
<ex:CustomerNumber1234</ex:CustomerNumber
<ex:NameChip Pearson</ex:Name
<ex:Address1020 W 56 St</ex:Address
<ex:CityKansas City</ex:City
<ex:StateMO</ex:State
<ex:Zip64112</ex:Zip
<ex:Orders
<ex:Order
<ex:ItemNumber321</ex:ItemNumber
<ex:Quantity10</ex:Quantity
</ex:Order
<ex:Order
<ex:ItemNumber4321</ex:ItemNumber
<ex:Quantity20</ex:Quantity
</ex:Order
</ex:Orders
</ex:ExportList

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Mon, 3 Nov 2008 11:04:01 -0800, Diane
wrote:

I have a spreadsheet with a specific format:

B14: Customer No.
B15: Name
B16: Address
B17: City
B18: State
B19: Zip

A20 (header) B20 (header)
Item No. Qty Ordered

A21 ... A100 B21 ... B100
Column of Item Nos Qty of Each Item No ordered

All fields above B14 should be ignored (they are just visual stuff)

I want to create an XSD to this spreadsheet so I can save the document as
xml I can use and import elsewhere

How can I create the xsd so that I can map the spreadsheet? I guess my
question is - what is my next step so that I can save this as xml in the
proper format. I believe I need to create the xsd so I can map this and then
I can export it as xml.

Am I totally off base - or heading in the right direction?

Any help would be greatly appreciated.

Regards,
Diane

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
Export Excel tuncating leading zeros while export to excel from da RHBKV Setting up and Configuration of Excel 1 July 15th 09 01:48 PM
Chart.Export images are shrinking as I export more images Jared Charts and Charting in Excel 3 January 29th 08 03:23 AM
export re-order input fields to export file [csv] madisonpete Excel Worksheet Functions 0 November 30th 07 03:51 PM
Question about creating macro (to export to quickbooks pro) [email protected] Excel Programming 1 December 30th 05 03:33 AM
How to export all chartobjects in a sheet to powerpoint (creating a new ppt file) as pictures? Gunnar Johansson Charts and Charting in Excel 1 May 9th 05 05:10 AM


All times are GMT +1. The time now is 06:06 PM.

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

About Us

"It's about Microsoft Excel"