watt has asked for the wisdom of the Perl Monks concerning the following question:

Update: I haven't fixed that problem, but surprisingly it's no longer an issue: The script is spitting out .xls files with the proper data. The problem now is that the pivot tables are all erased. Anyone know how to make pivot tables with this module?

I'm trying to take an excel report with pivot tables and alter all the values in the data sheet so as to reproduce the report for other customers with different data.

Unfortunately my attempts to rewrite all the cells using "AddCell" and then spit out the new and improved reports using the "SaveAs" function aren't working too well. I'm using perl 5.8.8 on RedHat, I believe.

At the moment I'm getting lots of:

Use of uninitialized value in division (/) at perl_directory/SaveParser.pm line 149.

I know from checking around people have made stuff like this work, but I can't seem to find out how. Any help would be appreciated.

  • Comment on Spreadsheet::ParseExcel::SaveParser and worksheet insertion

Replies are listed 'Best First'.
Re: Spreadsheet::ParseExcel::SaveParser and worksheet insertion
by hipowls (Curate) on Jan 26, 2008 at 01:35 UTC

    It is trying to set the margin on the worksheet (if the latest version is the same as the one you are using). Without seeing any code it's not easy to say what you should do but one of these methods may be what you want

    set_margins() # Set all margins to the same value set_margins_LR() # Set left and right margins to the same value set_margins_TB() # Set top and bottom margins to the same value set_margin_left(); # Set left margin set_margin_right(); # Set right margin set_margin_top(); # Set top margin set_margin_bottom(); # Set bottom margin
    See for more information.

      Thank you for your wisdom. It seems that, over the weekend, some cosmic rays hit the server in question and aligned the electrons such that the initialization of these variables is no-longer necessary.