R
Ravi Krishna
Hi,
I need to generate XML reports in Perl which can be read by Excel.
I get the data from database using Perl DBI/DBD.
Excel has the capability to directly read a XML file and display it,
while preserving all fonts, colors etc.
Is there a module in CPAN (or elsewhere) where I can convert standard row/column
data into a Excel-XML. A sample of that type of XML is attached below.
TIA.
Ravi
===========================================
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s21">
<NumberFormat ss:Format="#,##0"/>
</Style>
<Style ss:ID="s22">
<Font x:Family="Swiss" ss:Italic="1"/>
</Style>
<Style ss:ID="s23">
<Font x:Family="Swiss" ss:Bold="1"/>
</Style>
<Style ss:ID="s24">
<Font x:Family="Swiss" ss:Bold="1"/>
<NumberFormat ss:Format="#,##0"/>
</Style>
</Styles>
<Worksheet ss:Name="bigbroweek">
<Table ss:ExpandedColumnCount="24" ss:ExpandedRowCount="22" x:FullColumns="1"
x:FullRows="1">
<Row ss:StyleID="s22">
<Cell><Data ss:Type="String">Client</Data></Cell>
<Cell><Data ss:Type="String">Searches</Data></Cell>
<Cell><Data ss:Type="String">GS Searches</Data></Cell>
<Cell><Data ss:Type="String">B2C Pnrs Booked</Data></Cell>
<Cell><Data ss:Type="String">B2C Psgrs Booked</Data></Cell>
<Cell><Data ss:Type="String">B2C Ticketed PNRs</Data></Cell>
<Cell><Data ss:Type="String">B2C Psgr Ticketed</Data></Cell>
<Cell><Data ss:Type="String">GS Pnrs Booked</Data></Cell>
<Cell><Data ss:Type="String">GS Pnrs Psgr</Data></Cell>
<Cell><Data ss:Type="String">GS Ticketed PNRs</Data></Cell>
<Cell><Data ss:Type="String">GS Psgrs ticketed</Data></Cell>
<Cell><Data ss:Type="String">GUI Booking</Data></Cell>
<Cell><Data ss:Type="String">Pub Booking</Data></Cell>
<Cell><Data ss:Type="String">Pub Booking value($)</Data></Cell>
<Cell><Data ss:Type="String">Net Booking</Data></Cell>
I need to generate XML reports in Perl which can be read by Excel.
I get the data from database using Perl DBI/DBD.
Excel has the capability to directly read a XML file and display it,
while preserving all fonts, colors etc.
Is there a module in CPAN (or elsewhere) where I can convert standard row/column
data into a Excel-XML. A sample of that type of XML is attached below.
TIA.
Ravi
===========================================
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s21">
<NumberFormat ss:Format="#,##0"/>
</Style>
<Style ss:ID="s22">
<Font x:Family="Swiss" ss:Italic="1"/>
</Style>
<Style ss:ID="s23">
<Font x:Family="Swiss" ss:Bold="1"/>
</Style>
<Style ss:ID="s24">
<Font x:Family="Swiss" ss:Bold="1"/>
<NumberFormat ss:Format="#,##0"/>
</Style>
</Styles>
<Worksheet ss:Name="bigbroweek">
<Table ss:ExpandedColumnCount="24" ss:ExpandedRowCount="22" x:FullColumns="1"
x:FullRows="1">
<Row ss:StyleID="s22">
<Cell><Data ss:Type="String">Client</Data></Cell>
<Cell><Data ss:Type="String">Searches</Data></Cell>
<Cell><Data ss:Type="String">GS Searches</Data></Cell>
<Cell><Data ss:Type="String">B2C Pnrs Booked</Data></Cell>
<Cell><Data ss:Type="String">B2C Psgrs Booked</Data></Cell>
<Cell><Data ss:Type="String">B2C Ticketed PNRs</Data></Cell>
<Cell><Data ss:Type="String">B2C Psgr Ticketed</Data></Cell>
<Cell><Data ss:Type="String">GS Pnrs Booked</Data></Cell>
<Cell><Data ss:Type="String">GS Pnrs Psgr</Data></Cell>
<Cell><Data ss:Type="String">GS Ticketed PNRs</Data></Cell>
<Cell><Data ss:Type="String">GS Psgrs ticketed</Data></Cell>
<Cell><Data ss:Type="String">GUI Booking</Data></Cell>
<Cell><Data ss:Type="String">Pub Booking</Data></Cell>
<Cell><Data ss:Type="String">Pub Booking value($)</Data></Cell>
<Cell><Data ss:Type="String">Net Booking</Data></Cell>