colox has asked for the wisdom of the Perl Monks concerning the following question:
dear perlmonks, I have below short code to read a simple excel (2010) table:
use strict; use warnings; use Spreadsheet::ExcelHashTable; my $file ='D:\\Scripts\\DeviceID_TableAssociation.xlsx'; print $file; my $excel_table = Spreadsheet::ExcelHashTable->new($file); $excel_table->parse_table("Sheet1", "ID") ; my $excel_hash = $excel_table->get_table("ID");
But im getting below error: Can't call method "worksheet" on an undefined value at C:/Strawberry/perl/site/lib/Spreadsheet/ExcelHashTable.pm line 49. Below is the table from excel:
----------------------- | ID | Name | ----------------------- | 001 | AAA | ----------------------- | 002 | BBB | -----------------------
Please let me know what am I missing or doing incorrectly. thank you all.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: excel to hash
by NetWallah (Canon) on Sep 13, 2017 at 16:32 UTC | |
Re: excel to hash
by haukex (Archbishop) on Sep 13, 2017 at 16:27 UTC | |
Re: excel to hash
by Discipulus (Canon) on Sep 13, 2017 at 16:39 UTC | |
by Tux (Canon) on Sep 14, 2017 at 06:29 UTC | |
by colox (Sexton) on Sep 13, 2017 at 16:43 UTC | |
by Discipulus (Canon) on Sep 13, 2017 at 17:05 UTC | |
by 1nickt (Canon) on Sep 13, 2017 at 17:08 UTC | |
by colox (Sexton) on Sep 13, 2017 at 18:19 UTC | |
by colox (Sexton) on Sep 13, 2017 at 18:33 UTC | |
|
Back to
Seekers of Perl Wisdom