I am looking at developing a MS 365 Excel Add-in that will be able to source rows from a worksheet to compose test cases for execution against a webservice that accepts a XML request payload, and processes a XML response creating a row in a separate worksheet. The sequence would be as follows:
- Load worksheet A rows into XML request document
- Apply XSL-T to transform into webservice request format
- Call webservice
- Process webservice response and write XML to worksheet B
- Compare worksheet B to expected result in worksheet C
For example to following source worksheet data
First Name, Last Name, DOB
John, Doe, 01/01/1970
Fred, Smith, 01/01/1980
would be converted into
<Worksheet>
<Row>
<First Name>John</First Name>
<Last Name>Doe</Last Name>
<DOB>01/01/1970</DOB>
</Row>
<Row>
<First Name>Fred</First Name>
<Last Name>Smith</Last Name>
<DOB>01/01/1980</DOB>
</Row>
</Worksheet>
I would also like to convert the response using a XSL-T into a format that can easily be used to create rows in a response worksheet.
My question is whether there is any OOB support in the Excel libraries to automatically convert from the worksheet to XML and vice versa
Thanks in advance
The following works