Skip Menu |

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

Report information
The Basics
Id: 47136
Status: open
Priority: 0/
Queue: Spreadsheet-ParseExcel-Simple

People
Owner: Nobody in particular
Requestors: ayushraman [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problem in using Spreadsheet-ParseExcel-Simple
Date: Fri, 19 Jun 2009 01:52:21 -0400
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Ayush Raman <ayushraman [...] gmail.com>
Hi, I have been trying to use Spreadsheet-ParseExcel-Simple module for my script but it is giving me the following error. Can't call method "sheets" on an undefined value I am working on WindowsXP and the excel files are in 97-2003 format. Any help will be highly appreciated. -- Regards, Ayush Raman
Subject: Re: [rt.cpan.org #47136] Problem in using Spreadsheet-ParseExcel-Simple
Date: Fri, 19 Jun 2009 13:55:21 +0300
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
On Fri, Jun 19, 2009 at 8:53 AM, Ayush Raman via RT<bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org> wrote: Show quoted text
> I have been trying to use Spreadsheet-ParseExcel-Simple module for my script > but it is giving me the following error. > Can't call method "sheets" on an undefined value
Hi Ayush, Unfortunately I can't diagnose much from that. Does this happen with every spreadsheet? Can you send through the code you're using? Thanks, Tony
Subject: Re: [rt.cpan.org #47136] Problem in using Spreadsheet-ParseExcel-Simple
Date: Fri, 19 Jun 2009 12:35:55 -0400
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Ayush Raman <ayushraman [...] gmail.com>
Hi Tony, Here is the code. #!/usr/bin/perl use IO::Uncompress::Unzip qw(unzip $UnzipError); use Spreadsheet::ParseExcel::Simple; use Spreadsheet::WriteExcel; use Spreadsheet::WriteExcel::Utility; $excel_directory = 'C:\Test'; opendir(EXCELDIR, $excel_directory) || die ("no excel directory"); @excelfiles = readdir(EXCELDIR); foreach $exxfilename (@excelfiles){ $x = 0; $y = 0; $c = 0; if ($exxfilename =~ /^\.+.*/) { next; } $xls = Spreadsheet::ParseExcel::Simple->read($exxfilename); $str = substr($exxfilename,0,5); $filename = $str.'GeneName.xls'; $workbook = Spreadsheet::WriteExcel->new($filename); $worksheet = $workbook->add_worksheet(); foreach $sheet ($xls -> sheets()) ### This command is not working. The sheets () is not working. { while ($sheet->has_data) { @data = $sheet->next_row; @grepNames = grep(/Gene Name/, @data); if ($grepNames == 1){ $c = $c + 1; } if ($c == 1){ $gene_name = $data[4]; $worksheet->write($y++, $x, $gene_name); } } } } closedir(EXCELDIR); Kindly let me know other alternatives to read the xls file and parse a definite column with no definite starting row and ending row in Excel sheet. Thanks. Regards, Ayush Raman On Fri, Jun 19, 2009 at 6:55 AM, tony@tmtm.com via RT < bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=47136 > > > On Fri, Jun 19, 2009 at 8:53 AM, Ayush Raman via > RT<bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org> wrote:
> > I have been trying to use Spreadsheet-ParseExcel-Simple module for my
> script
> > but it is giving me the following error. > > Can't call method "sheets" on an undefined value
> > Hi Ayush, > > Unfortunately I can't diagnose much from that. Does this happen with > every spreadsheet? Can you send through the code you're using? > > Thanks, > > Tony > >
-- Regards, Ayush Raman
Subject: Re: [rt.cpan.org #47136] Problem in using Spreadsheet-ParseExcel-Simple
Date: Sat, 20 Jun 2009 11:21:02 +0100
To: bug-Spreadsheet-ParseExcel-Simple [...] rt.cpan.org
From: Tony Bowden <tony [...] tmtm.com>
On Fri, Jun 19, 2009 at 5:36 PM, Ayush Raman via RT<bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org> wrote: Show quoted text
> Hi Tony, > Here is the code.
Hi Ayush, This code is doing far too much stuff to easily see what's going wrong. Can you boil this down to the minimal possible failing case? Thanks, Tony