NAME

PDL::IO::XLSX - Load/save PDL from/to XLSX file (optimized for speed and large data)

SYNOPSIS

use PDL;
use PDL::IO::XLSX ':all';

my $pdl = rxlsx2D('input.xlsx');
$pdl *= 2;
wxlsx2D($pdl, 'double.xlsx');

my ($pdl1, $pdl2, $pdl3) = rxlsx1D('input.xlsx', [0, 1, 6]);
wxlsx1D($pdl1, 'col2.xlsx');
#or
$pdl2->wxlsx1D('col2.xlsx');

DESCRIPTION

PDL::IO::XLSX supports reading XLSX files and creating PDL piddle(s) as well as saving PDL data to XLSX file.

FUNCTIONS

By default, PDL::IO::XLSX doesn't import any function. You can import individual functions like this:

use PDL::IO::XLSX qw(rxlsx2D wxlsx2D);

Or import all available functions:

use PDL::IO::XLSX ':all';

rxlsx1D

Loads data from XLSX file into 1D piddles (separate for each column).

my ($pdl1, $pdl2, $pdl3) = rxlsx1D($xlsx_filename_or_filehandle);
#or
my ($pdl1, $pdl2, $pdl3) = rxlsx1D($xlsx_filename_or_filehandle, \@column_ids);
#or
my ($pdl1, $pdl2, $pdl3) = rxlsx1D($xlsx_filename_or_filehandle, \%options);
#or
my ($pdl1, $pdl2, $pdl3) = rxlsx1D($xlsx_filename_or_filehandle, \@column_ids, \%options);

Parameters:

Items supported in options hash:

rxlsx2D

Loads data from XLSX file into 2D piddle.

my $pdl = rxlsx2D($xlsx_filename_or_filehandle);
#or
my $pdl = rxlsx2D($xlsx_filename_or_filehandle, \@column_ids);
#or
my $pdl = rxlsx2D($xlsx_filename_or_filehandle, \%options);
#or
my $pdl = rxlsx2D($xlsx_filename_or_filehandle, \@column_ids, \%options);

Parameters and items supported in options hash are the same as by "rxlsx1D".

wxlsx1D

Saves data from one or more 1D piddles to XLSX file.

wxlsx1D($pdl1, $pdl2, $pdl3, $xlsx_filename_or_filehandle, \%options);
#or
wxlsx1D($pdl1, $pdl2, $pdl3, $xlsx_filename_or_filehandle);
#or
wxlsx1D($pdl1, $pdl2);

# but also as a piddle method
$pdl1D->wxlsx1D("file.xlsx");

Parameters:

Items supported in options hash:

wxlsx2D

Saves data from one 2D piddle to XLSX file.

wxlsx2D($pdl, $xlsx_filename_or_filehandle, \%options);
#or
wxlsx2D($pdl, $xlsx_filename_or_filehandle);
#or
wxlsx2D($pdl);

# but also as a piddle method
$pdl->wxlsx2D("file.xlsx");

Parameters and items supported in options hash are the same as by "wxlsx1D".

CREDITS

This modules is largely inspired by Data::XLSX::Parser and Excel::Writer::XLSX.

SEE ALSO

PDL

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

COPYRIGHT

2016+ KMX kmx@cpan.org