I have an Excel (xls) template with example data. I need to prepare an Excel file with dynamically- generated data.
First, I made an XML file from the corresponding xls. The XML file looks like this :
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<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">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Op</Author>
<LastAuthor>ufoq</LastAuthor>
<Created>2011-11-18T06:54:25Z</Created>
<LastSaved>2011-12-05T11:43:26Z</LastSaved>
<Version>11.9999</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>9750</WindowHeight>
<WindowWidth>23310</WindowWidth>
<WindowTopX>480</WindowTopX>
<WindowTopY>405</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font x:CharSet="238" x:Family="Swiss" ss:Size="8" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
......
Now I placed this content in symfony view and filled it with my generated data. I need to output in XML file format but I don't know how to to this. The new file must have the same structure as the template file so I cannot make a new file from scratch.