Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Excel::Template corrupt output

by Anonymous Monk
on Aug 19, 2004 at 15:33 UTC ( [id://384331]=note: print w/replies, xml ) Need Help??


in reply to Re: Excel::Template corrupt output
in thread Excel::Template corrupt output

Excel::Template 0.12
Spreadsheet::WriteExcel 2.03
MS Excel 2003
Linux w/2.4 kernel, Perl 5.6.2
Command line
#!/usr/bin/perl -w use strict; use Excel::Template; my $excel_template = Excel::Template->new(filename => 'test_template.x +ml'); $excel_template->write_file('test.xls');

Here's the template:
<workbook> <worksheet name="Test"> <cell text="A single cell"/> </worksheet> </workbook>

Replies are listed 'Best First'.
Re^3: Excel::Template corrupt output
by dragonchild (Archbishop) on Aug 19, 2004 at 15:44 UTC
    I ran your code with the following setup and it worked just fine without any errors. You sure you're using a binary transfer mode when ftp'ing the file?
    • RH9 (2.4 kernel), Perl 5.8.0 (vendor build)
    • S::WE 2.04, E::T 0.12
    • MS Excel 2002 (I don't have access to Office2k3)

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested

      Yes, I'm sure. I'm transferring the file with Samba.

      I can successfully run the code on Windows with Perl 5.8.x and the file opens without warning; the only thing I've noticed is that the corrupt file is 2 bytes larger (5,634 bytes vs. 5,632).
        Please go ahead an open a bug on rt.cpan.org and I'll look at it. The suspect I'm looking at right now is the Perl version - 5.6.x vs. 5.8.x, but I don't have a 5.6.x version handy. It might be a few days before I get one installed and running (work is heating up right now).

        Try installing 5.8.x on the linux box and see if that fixes things. When I ran on Linux using 5.8.0, my file was 5632 bytes long.

        ------
        We are the carpenters and bricklayers of the Information Age.

        Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

        I shouldn't have to say this, but any code, unless otherwise stated, is untested

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found