How can I read Excel files in Perl?

I am looking for some examples / tips on how to write a Perl script to read data from an excel file, and then use the data read in (hopefully) and pass it to another Perl file (as an argument).

The goal is to have a table in which the user can enter some data (ftp destination or filename) into the table. Then my program will capture this data, having done some automation with it. It does not have to be very elegant in implementation ... It just needs to be read more or less by data lines.

+6
perl excel
source share
3 answers

Spreadsheet :: ParseExcel module can read Excel files. The documentation includes usage examples.

+13
source share

You can use Spreadsheet :: Read , which will delegate the appropriate module to read spreadsheets in various formats such as Excel, OpenOffice and CSV.

On the other hand, given your description of the problem, I think it would be much better for you to use the standard configuration file format:

#!/usr/bin/perl use Config::Std; read_config 'ftp.ini' => my %config; for my $file ( keys %config ) { print "File: '$file'\n"; print "$_: ", $config{$file}->{$_}, "\n" for qw( site protocol remote_name); } 

ftp.ini :

  [c: \ Documents and Settings \ user \ My Documents \ this.txt]
 site = ftp.example.com
 protocol = ftp
 remote_name = that.txt
+8
source share

Check out the summary in these modules:

+6
source share

All Articles