Thread

Posted on Thu Nov 15 10:09:44 2007 by vish
want to set cell type as numbers
Hello there i want to set type of cell as numbers instead of string which is by default, also i am using Spreadsheet::WriteExcel then how to use two modules as i need to give worksheet object for both.. will really appreciate if you can give me some examples. thanks - vish
Direct Responses: 8256 | Write a response
Posted on Thu Jul 10 01:12:32 2008 by pfudd in response to 6459
Re: want to set cell type as numbers
I have a similar problem; here is my test program:
#!/usr/bin/perl -w use strict; my $INFILE="test2-in.xls"; my $OUTFILE="test2.xls"; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; # Open an existing file with SaveParser my $parser = new Spreadsheet::ParseExcel::SaveParser; my $excel = $parser->Parse($INFILE); # Save it $excel->SaveAs($OUTFILE);
This program converts all numbers to text when it copies the spreadsheet. I think the bug is in Spreadsheet::WriteExcel, because Spreadsheet::WriteExcel::write_number() is being used for numbers, to no effect.
Write a response