2019-02-01, 18:32
Can someone tell me what I'm doing wrong? I'm trying to export an excel sheet of all my movies showing the filesize of the movie.
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urnchemas-microsoft-com:officepreadsheet"
xmlns:o="urnchemas-microsoft-com:office:office"
xmlns:x="urnchemas-microsoft-com:office:excel"
xmlnss="urnchemas-microsoft-com:officepreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s22">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
</Style>
<Style ss:ID="s23">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
<NumberFormat ss:Format="Short Date"/>
</Style>
</Styles>
<Worksheet ss:Name="movielist">
<Table x:FullColumns="1" x:FullRows="1" ssefaultColumnWidth="60">
<Column ss:Width="200.00"/>
<Column ss:Width="33.00" ss:StyleID="s22" />
<Column ss:Width="70.00" ss:StyleID="s23" />
<Column ss:Width="300.00"/>
${foreach movies movie}
<Row>
<Cell><Data ss:Type="String">${movie.title}</Data></Cell>
<Cell><Data ss:Type="Number">${movie.year}</Data></Cell>
<Cell><Data ss:Type="DateTime">${movie.dateAdded;date(yyyy-MM-dd)}T00:00:00.000</Data></Cell>
<Cell><Data ss:Type="String">${movie.path}</Data></Cell>
<Cell><Data ss:Type="Long">${mediafile.filesizeInMegabytes}</Data></Cell>
<Cell><Data ss:Type="String">${mediafile.filesize}</Data></Cell>
</Row>
${end}
</Table>
</Worksheet>
</Workbook>
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urnchemas-microsoft-com:officepreadsheet"
xmlns:o="urnchemas-microsoft-com:office:office"
xmlns:x="urnchemas-microsoft-com:office:excel"
xmlnss="urnchemas-microsoft-com:officepreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s22">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
</Style>
<Style ss:ID="s23">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
<NumberFormat ss:Format="Short Date"/>
</Style>
</Styles>
<Worksheet ss:Name="movielist">
<Table x:FullColumns="1" x:FullRows="1" ssefaultColumnWidth="60">
<Column ss:Width="200.00"/>
<Column ss:Width="33.00" ss:StyleID="s22" />
<Column ss:Width="70.00" ss:StyleID="s23" />
<Column ss:Width="300.00"/>
${foreach movies movie}
<Row>
<Cell><Data ss:Type="String">${movie.title}</Data></Cell>
<Cell><Data ss:Type="Number">${movie.year}</Data></Cell>
<Cell><Data ss:Type="DateTime">${movie.dateAdded;date(yyyy-MM-dd)}T00:00:00.000</Data></Cell>
<Cell><Data ss:Type="String">${movie.path}</Data></Cell>
<Cell><Data ss:Type="Long">${mediafile.filesizeInMegabytes}</Data></Cell>
<Cell><Data ss:Type="String">${mediafile.filesize}</Data></Cell>
</Row>
${end}
</Table>
</Worksheet>
</Workbook>