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: 61878
Status: resolved
Priority: 0/
Queue: Spreadsheet-WriteExcel

People
Owner: Nobody in particular
Requestors: ftl [...] dnv.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 2.35
  • 2.37
Fixed in: (no value)



Subject: Unhiding columns with width undef or 8.43 disapears in Excel2010
Hiding columns, and then unhiding them on demand, works fine against Excel200x. Against Excel2010, this only works if column width defined AND is different from 8.43! (which is the default width in Excel) Sceenshots attached in ppt, as well as generating code, and generated file. Works fine in Excel2003. Generating platform Perl version : 5.010000 OS name : MSWin32 Module versions: (not all are required) Spreadsheet::WriteExcel 2.35 Parse::RecDescent 1.962.2 File::Temp 0.22 OLE::Storage_Lite 0.19 IO::Stringy 2.110 Spreadsheet::ParseExcel 0.56 Scalar::Util 1.19 Unicode::Map (not installed also tested with S:W 2.37, and
Subject: WriteExcel.ppt
Download WriteExcel.ppt
application/vnd.ms-powerpoint 428k

Message body not shown because it is not plain text.

Subject: a_simple.xls
Download a_simple.xls
application/vnd.ms-excel 5.5k

Message body not shown because it is not plain text.

Subject: Demo_col_error.pl
#!/usr/bin/perl -w use strict; use Spreadsheet::WriteExcel; # Create a new workbook called simple.xls and add a worksheet my $workbook = Spreadsheet::WriteExcel->new('a_simple.xls'); my $worksheet1 = $workbook->add_worksheet(); my $worksheet2 = $workbook->add_worksheet(); my $worksheet3 = $workbook->add_worksheet(); populate_worksheet($worksheet1); populate_worksheet($worksheet2); populate_worksheet($worksheet3); #Sheet 1,2,3 #hide most colums my $width = undef; my $format = undef; my $hidden = 1; $worksheet1->set_column(1, 5, $width, $format, $hidden); $worksheet2->set_column(1, 5, $width, $format, $hidden); $worksheet3->set_column(1, 5, $width, $format, $hidden); #Sheet 1 #unhide one colum, no column width $width = undef; $hidden = 0; $worksheet1->set_column(3, 3, $width, $format, $hidden); #Sheet 2 #unhide one colum, with any width defined $width = 5; $hidden = 0; $worksheet2->set_column(3, 3, $width, $format, $hidden); #Sheet 3 #unhide one colum, with default width $width = 8.43; $hidden = 0; $worksheet3->set_column(3, 3, $width, $format, $hidden); sub populate_worksheet { my ($ws) = @_; $ws->write(0, 0, "Hi Excel!"); $ws->write(0, 1, 'BBB'); $ws->write(0, 2, 'CCC'); $ws->write(0, 3, 'DDD'); $ws->write(0, 4, 'EEE'); $ws->write(0, 5, 'FFF'); $ws->write(0, 6, 'GGG'); $ws->write(0, 7, 'HHH'); } __END__
Hi, Thanks for the very detailed report. I'll have a look at it and let you know. John. --
Subject: RE: [rt.cpan.org #61878] Unhiding columns with width undef or 8.43 disapears in Excel2010
Date: Mon, 4 Oct 2010 16:03:33 +0200
To: <bug-Spreadsheet-WriteExcel [...] rt.cpan.org>
From: <Frode.Thue.Lie [...] dnv.com>
Hi, Thanks, (I found a work-around in the application, so no rush for me) Even more interesting is that by setting the width to e.g. 8, and then to 8.43 or 0 everything works fine! (the columns are unhidden as they should) The way these data are stored in _colinfo, it actually looks more like a MS issue than a WriteExcel-issue. The two following additions works in Excel2003 and 2010. #Sheet 4 #unhide one colum, with widh 5, and then default width 8.43 $width = 8; $hidden = 0; $worksheet4->set_column(3, 3, $width, $format, $hidden); $width = 8.43; $worksheet4->set_column(3, 3, $width, $format, $hidden); #Sheet 5 #unhide one colum, with widh 5, and then width 0 $width = 8; $hidden = 0; $worksheet5->set_column(3, 3, $width, $format, $hidden); $width = 0; $worksheet5->set_column(3, 3, $width, $format, $hidden); Best regards/ Med vennlig hilsen, Frode T. Lie Show quoted text
-----Original Message----- From: John McNamara via RT [mailto:bug-Spreadsheet-WriteExcel@rt.cpan.org] Sent: 4. oktober 2010 15:52 To: Lie, Frode Thue Subject: [rt.cpan.org #61878] Unhiding columns with width undef or 8.43 disapears in Excel2010 <URL: https://rt.cpan.org/Ticket/Display.html?id=61878 > Hi, Thanks for the very detailed report. I'll have a look at it and let you know. John. -- **************************************************************************************The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.**************************************************************************************
Closing this issue. Can't fix. Suggest using Excel::Writer::XLSX instead.
Subject: Out of Office AutoReply: [rt.cpan.org #61878] Unhiding columns with width undef or 8.43 disapears in Excel2010
Date: Thu, 22 Nov 2012 00:31:51 +0100
To: <bug-Spreadsheet-WriteExcel [...] rt.cpan.org>
From: <Frode.Thue.Lie [...] dnvkema.com>
I will be out of the office, but may read mail occasionally. Back on nov 23. For ERM and other applications support, use erm. support -0- dnv com Frode Cellular (+47) 9 585 585 1