Skip Menu |
 

This queue is for tickets about the Spreadsheet-WriteExcel CPAN distribution.

Maintainer(s)' notes

If you are reporting a bug in Spreadsheet::WriteExcel here are some pointers

1) State the issues as clearly and as concisely as possible. A simple program or Excel test file (see below) will often explain the issue better than a lot of text.

2) Provide information on your system, version of perl and module versions. The following program will generate everything that is required. Put this information in your bug report.

    #!/usr/bin/perl -w

    print "\n    Perl version   : $]";
    print "\n    OS name        : $^O";
    print "\n    Module versions: (not all are required)\n";

    my @modules = qw(
                      Spreadsheet::WriteExcel
                      Parse::RecDescent
                      File::Temp
                      OLE::Storage_Lite
                      IO::Stringy
                      Spreadsheet::ParseExcel
                      Scalar::Util
                      Unicode::Map
                    );

    for my $module (@modules) {
        my $version;
        eval "require $module";

        if (not $@) {
            $version = $module->VERSION;
            $version = '(unknown)' if not defined $version;
        }
        else {
            $version = '(not installed)';
        }

        printf "%21s%-24s\t%s\n", "", $module, $version;
    }

    __END__

3) Upgrade to the latest version of Spreadsheet::WriteExcel (or at least test on a system with an upgraded version). The issue you are reporting may already have been fixed.

4) Create a small but complete example program that demonstrates your problem. The program should be as small as possible. At the same time it should be a complete program that generates an Excel file. If the Spreadsheet::WriteExcel section is part of a much larger program then simplify it down to the essentials. Simulate any DB reads with an array.

5) Say if you tested with Excel, OpenOffice, Gnumeric or something else. Say which version of that application you used.

6) If you are submitting a patch you should check with the author whether the issue has already been patched or if a fix is in the works. Patches should be accompanied by test cases.

Asking a question

If you would like to ask a more general question there is the Spreadsheet::WriteExcel Google Group.

Report information
The Basics
Id: 32544
Status: resolved
Worked: 12 hours (720 min)
Priority: 0/
Queue: Spreadsheet-WriteExcel

People
Owner: jmcnamara [...] cpan.org
Requestors: dkatzel [...] jcvi.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.20
Fixed in: 2.21



Subject: worksheet-> write() is missing Row Record tag / can not be parsed by Apache POI (WriteExcel's Java counterpart)
Download (untitled) / with headers
text/plain 1.1k
First, I just want to say that this is a great product, I only noticed this bug when I started writing programs that passed Excel files around that were written in Perl using WriteExcel and parsed by another application written in Java using Apache's POI library. The worksheet data produced by WriteExcel's worksheet->write() does not contain any Records with the name "ROW" record (id = x208 ) The ROW record describes Row properties for all cells in the Row Block. Files which are missing ROW records are not able to be parsed by other Excel parsers such as Apache's POI http://poi.apache.org/index.html Please see sections 4.7 and 5.1 in the OpenOffice.org's Documentation of the Microsoft Excel File Format http://sc.openoffice.org/excelfileformat.pdf for more information on how the ROW record is used. The only time a Row record is written is in the worksheet->set_row() method. Apache's POI is only able to parse the first of these rows correctly which may mean that set_row isn't correctly closing the ROW tag. I found a workaround: open the file created by WriteExcel in OpenOffice /Excel and then perform a "save as". This will add the missing Row record information. Thank you for your help, Danny
Download (untitled) / with headers
text/plain 907b
Hi, This issue should be fixed in the next release. You can test a pre-release that is available here: http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.20.04.tar.gz This release includes a new workbook method called compatibility_mode() which adds some records to the file format that Excel doesn't strictly require but other parsers may require. One of these is explicit ROW records. An example of how to use it is shown below. Please note that the documentation on this feature in the pre-release version isn't correct. #!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; my $workbook = Spreadsheet::WriteExcel->new('test.xls'); $workbook->compatibility_mode(); # Add this. my $worksheet = $workbook->add_worksheet(); ... I would be grateful if you could try this and let me know if you encounter any problems. John. --
From: dkatzel [...] jcvi.org
Download (untitled) / with headers
text/plain 1.1k
Wow thanks a lot! So far, compatibility_mode makes everything work! Will compatibility mode be on by default in future releases? -Danny On Tue Jan 22 18:07:32 2008, JMCNAMARA wrote: Show quoted text
> > Hi, > > This issue should be fixed in the next release. You can test a > pre-release that is available here: > > http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet- > WriteExcel-2.20.04.tar.gz > > This release includes a new workbook method called > compatibility_mode() > which adds some records to the file format that Excel doesn't strictly > require but other parsers may require. One of these is explicit ROW > records. > > An example of how to use it is shown below. Please note that the > documentation on this feature in the pre-release version isn't > correct. > > > #!/usr/bin/perl -w > > use strict; > use Spreadsheet::WriteExcel; > > my $workbook = Spreadsheet::WriteExcel->new('test.xls'); > > $workbook->compatibility_mode(); # Add this. > > my $worksheet = $workbook->add_worksheet(); > > ... > > I would be grateful if you could try this and let me know if you > encounter any problems. > > John.
Download (untitled) / with headers
text/plain 490b
On Tue Jan 22 18:22:21 2008, dkatzel wrote: Show quoted text
> Wow thanks a lot! So far, compatibility_mode makes everything work! > > Will compatibility mode be on by default in future releases?
Hi, Initially I intended it to be on. However, some of the pre-release testers ran into slow downs for files over 40MB since holding all the additional data in memory can create a large overhead. I may try to move the module to having it on by default but probably not in the next CPAN release. John. --
Fixed in version 2.21 when you use compatibility_mode(). See the updated docs. John. --


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.