Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I just started using Excel::Writer::XLSX and it's nt too difficult, I think, but here is something I don't understand.
The below example code puts the text "4004885000007" into A1 of an excel sheet and sets the format to "@", the Text format.
Now what happens when I open the file:
Does anyone here has an idea how I could get the text to be displayed correctly?
use strict; use warnings; use Excel::Writer::XLSX; # Create a new workbook called simple.xls and add a worksheet my $workbook = Excel::Writer::XLSX->new( 'a_simple.xlsx' ); my $worksheet = $workbook->add_worksheet(); my $textformat = $workbook->add_format(); $textformat->set_num_format( 0x31 ); $worksheet->write( 0, 0, "4004885000007", $textformat ); $workbook->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Excel::Writer::XLSX how to get the required format?
by hdb (Monsignor) on Jan 30, 2014 at 08:12 UTC | |
by Skeeve (Parson) on Jan 30, 2014 at 09:19 UTC |