Prev: Reverse engineering of Perl Code
Next: FAQ 3.23 Can I write useful Perl programs on the command line?
From: Jim Gibson on 20 Nov 2009 12:24 In article <938a83af-045a-4bd2-b7d4-a8b8a875d8fa(a)x6g2000prc.googlegroups.com>, Obama <cyrusgreats(a)gmail.com> wrote: > Justin, > > You have created a new worksheet in the above workbook, it too is empty. > Yes correct it is empty but I do have other function which read a file > and populate the data there so there problem here is not if this is > empty , assume it is not empty > > > my $t1 = xl_rowcol_to_cell(2, 4); �# E2 > > > my $t2 = xl_rowcol_to_cell(2, 5); �# F2 > > > > $t1 now contains the string "E3" (not E2 as you state). > > $t2 now contains the string "F3" (rows/cols counted from zero not one) > > > Not matter which column, my question was how to read/get the value > from cell You use Spreadsheet::ParseExcel (S:PE) to read data from an Excel spreadsheet document. You use Spreadsheet::WriteExcel (S:WE) to create an Excel spreadsheet and add data to its cells. You cannot use S:PE to add data to an existing spreadsheet, nor can you use S:WE to read data from a newly-created spreadsheet. If you are creating a spreadsheet with S:WE and want to see what has been added, you need to get the data from whatever source was used to generate the cell contents in the first place, not the spreadsheet itself. I suppose you could create a spreadsheet with S:WE, close it, then read its contents with S:PE. Just don't try to do both at the same time. Perhaps you can give us an idea of what you are really trying to accomplish. -- Jim Gibson
First
|
Prev
|
Pages: 1 2 Prev: Reverse engineering of Perl Code Next: FAQ 3.23 Can I write useful Perl programs on the command line? |