Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl module to generate Excel XML

Reply
Thread Tools

Perl module to generate Excel XML

 
 
Ravi Krishna
Guest
Posts: n/a
 
      01-22-2004
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>


 
Reply With Quote
 
 
 
 
AlV
Guest
Posts: n/a
 
      01-22-2004
Ravi Krishna wrote:
> 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.


What about writing Excel native file using Spreadsheet::WriteExcel?
http://search.cpan.org/~jmcnamara/Sp.../WriteExcel.pm

Or is there a strong requirement for XML other than being read by Excel?

 
Reply With Quote
 
 
 
 
John McNamara
Guest
Posts: n/a
 
      01-23-2004
"Ravi Krishna" <(E-Mail Removed)> wrote:

> 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.



You can create Excel files in the native binary format using
Spreadsheet::WriteExcel:

http://search.cpan.org/~jmcnamara/Sp...et-WriteExcel/

I wrote the above module and I am currently working on a version that
will emit Excel XML. I will hopefully be releasing a preliminary
version to CPAN in the next 2-3 weeks.

John.
--
 
Reply With Quote
 
Ravi Krishna
Guest
Posts: n/a
 
      01-23-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (John McNamara) wrote in message news:<(E-Mail Removed). com>...
> "Ravi Krishna" <(E-Mail Removed)> wrote:
>
> > 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.

>
>
> You can create Excel files in the native binary format using
> Spreadsheet::WriteExcel:
>
> http://search.cpan.org/~jmcnamara/Sp...et-WriteExcel/
>
> I wrote the above module and I am currently working on a version that
> will emit Excel XML. I will hopefully be releasing a preliminary
> version to CPAN in the next 2-3 weeks.


Excellent.
Thanks Avi and John.
If it is a wait of only a month, then I would prefer XML.

Thanks again.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl module to generate word report arun Perl Misc 1 11-19-2008 05:16 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
adding an excel worksheet to a generetad excel file via perl FlorianKraft@gmx.de Perl Misc 1 04-17-2007 12:53 PM
How to generate variable labels for same component within a generate loop Weng Tianxiang VHDL 5 02-16-2006 01:45 PM
ASP XML Support - Generate XML string from FORM DATA based on XML schema Matt ASP General 3 04-23-2004 07:12 PM



Advertisments