Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Creating Pivot tables from Perl

by Xaositect (Friar)
on Nov 09, 2005 at 00:32 UTC ( #506950=note: print w/replies, xml ) Need Help??


in reply to Creating Pivot tables from Perl

Sounds like you've already got a workable answer, but for the record, I've had a lot of luck constructing feature-rich Excel files using Excel and some sample data, and then saving them as XML.

Once you've got an Excel/XML file, it's not difficult to open in up and extrapolate the format and location of the data part of the file. Now you have a 'template' Excel document, and it's just a matter of substituting your data for the sample stuff, using whatever means you feel comfortable with. (Perl, PHP, XSLT, etc)

It's worth pointing out that although Excel names XML files '.xml', you can name them the usual '.xls' and Excel will open them just the same.

I make it sound straightforward, and it is, but do expect to spend some time ironing out bugs related to what formats and tags Excel expects.


Xaositect - Whitepages.com

Replies are listed 'Best First'.
Re^2: Creating Pivot tables from Perl
by narashima (Beadle) on Nov 09, 2005 at 14:50 UTC
    Thanks Buddy. Will sure try this out too.
Re^2: Creating Pivot tables from Perl
by jeromejay (Initiate) on Dec 16, 2011 at 08:53 UTC

    Xaositect: what you're saying is really interesting, since - I think - I have to do more or less the same thing:

    as an example: I have an Excel file with 2 tabs: 1st tab is just data 2nd tab has a few pivot tables using the data.

    => I'd like to create a Perl script that would update the data in the 1st tab, and then save the file with the pivot tables updated (then, the script would read the pivot tab and do stuff, but I can do that already).

    For now, I've tried with:
    use Spreadsheet::ParseExcel::SaveParser;
    I can update the data, but the pivot tables disappear to be replaced by "hard coded" data (I need to keep the pivot tables, so users can play with them on the dates and other stuff they need).

    Thanks for your help !

    ps: I'm under Solaris... to help things :/ So, as far as I know, I can't use Win32::OLE or VB scripts

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2020-10-29 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (269 votes). Check out past polls.

    Notices?