Does the QtmhWrStout api convert the data passed to it from ebcdic to ascii?
I ask because I am trying to send excel xml formatted data as an
attachment to the browser and the results are gibberish when opened in
excel.
I am sending different variations of Content-type and
Content-disposition followed by two X'15' line feeds.
wrtDta = 'Content-type: application/vnd.ms-excel' +
newLine +
'Content-disposition: ' +
'attachment; filename=test.xls' + newLine +
newLine ;
pr_qtmhwrstout( wrtdta: %len(wrtdta): wperror ) ;
another version of the content-type I tried:
wrtDta = 'Content-type: application/' +
'vnd.openxmlformats-officedocument.spreadsheetml.sheet' +
newLine +
'Content-disposition: ' +
'attachment; filename=test.xls' + newLine +
newLine ;
then I send the excel xml formatted data: Where each line ends with
x'15' . So far I have written the following text to qtmhwrstout as
ebcdic and then as ascii. Both times excel shows garbage.
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="
http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="2"
x:FullColumns="1" x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Example</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">Value</Data></Cell>
<Cell><Data ss:Type="Number">123</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
As an Amazon Associate we earn from qualifying purchases.