Fordraiders
asked on
Excel office 365 exporting data to a specific xml format
Excel office 365 exporting data to a specific xml format
I have a workbook xml_template.xlsm - macro book
Sheet1
however, i could have as many as 200 rows, the export will always vary.
But will always include Columns A B C
On sheet 1 i have data as such:
I need to export it out to a text.xml file in the format below:
It has to be in this format for a payload to a webservice
I tried just doing a save as and XML file in Excel but will not work properly
Thanks
fordraiders
I have a workbook xml_template.xlsm - macro book
Sheet1
however, i could have as many as 200 rows, the export will always vary.
But will always include Columns A B C
On sheet 1 i have data as such:
I need to export it out to a text.xml file in the format below:
It has to be in this format for a payload to a webservice
I tried just doing a save as and XML file in Excel but will not work properly
Thanks
fordraiders
So as I understand XML file merge, you need two files: the data file saved as .xml and the schema file saved as .xsd file. It looks like you have the two files. What were your next steps?
ASKER
i need to click on a button on the sheet to export the data from sheet1 to an xml file like this
xml format needed.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
chnages the schema to this and worked.
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EsrpPriceRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="Quote_Number" type="xs:string" />
<xs:element name="Account_Number" type="xs:string" />
<xs:element name="Items">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Items" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EsrpPriceRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="Quote_Number" type="xs:string" />
<xs:element name="Account_Number" type="xs:string" />
<xs:element name="Items">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Items" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I think I over-complicated the question. If you need Sheet 1 to look like the
Then it most likely is as simple as what is shown in this short video.. Import the above saved notepad into XML source, then follow steps through exporting to XML file. This should work.
https://www.youtube.com/watch?v=uDESRpPlOtk
Then it most likely is as simple as what is shown in this short video.. Import the above saved notepad into XML source, then follow steps through exporting to XML file. This should work.
https://www.youtube.com/watch?v=uDESRpPlOtk
Hey, great. Glad you got there. Sorry I couldn't help more.
ASKER
thanks