Hi,
Character K> is comming at last of XML file and thats why file is not opening.
more strange to me is, this issue I face sometime(not often).
Also when I faced this issue , I tried to run again the same code and with same input (took historical date), then there is no problem and file generated absolutely fine.
please find below(last line) where it is comming:
<?xml version="1.0" encoding="windows-1252"?>
<?mso-application progid="Excel.Sheet"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" 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"> <DocumentProperties xmlns="urn:schemas-microsoft-com:office"> --- --- <Row ss:AutoFitHeight="0" ss:StyleID="_body" ss:Height="14"> <Cell ss:StyleID="parskip"/> -- -- <Cell ss:StyleID="data__l" ss:Index="16"><Data ss:Type="String">XXXXXXX</Data></Cell> </Row> </Table> </Worksheet> </Workbook> k>
... View more