Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Generating an Excel Report

by delirium (Chaplain)
on Mar 02, 2004 at 14:21 UTC ( #333258=note: print w/replies, xml ) Need Help??


in reply to Re: Generating an Excel Report
in thread Generating an Excel Report

The naming a file .xls trick has more uses, too.

You can mark up an HTML table and apply font and centering options, and also formulas, then save it as .xls, and Excel won't complain. See this snippet for a simple example.

Formulas look like this:

<td x:num x:fmla="=B2+1"></td>

Replies are listed 'Best First'.
Re: Re: Re: Generating an Excel Report
by Grygonos (Chaplain) on Mar 02, 2004 at 15:49 UTC

    If you're on a Win32 platform you can also use Win32::OLE I don't know if it is bulkier or less efficient than Spreadsheet::WriteExcel, but it's what I have used, in the past (well yesterday really).

    This script runs some queries against a SQL Server Database to create the report that is then created and formatted via Win32::OLE. This is really more than you need, but its an example of a report that uses a decent amount of features and gives you an idea of what kind of code is needed to properly format something. Writing your own is more rewarding than gutting this one and making it fit your needs, so please do so if you find this one useful.

    Grygonos

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://333258]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2020-11-27 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?