#!/bin/env perl
use strict;
use Spreadsheet::Read;
use Spreadsheet::XLSX;
my $lExcelFileData = ReadData("test.xlsx");
#Reading Price information from the input excel sheet using template information
my $lRate = $lExcelFileData->[1]{A1};
print "Rate in xlsx file-> ".$lRate . "\n";
####
bash-3.2$ ./print_xlsx_file_surya1.pl
test.xlsx
Rate in xlsx file-> 0.99
####
5.8.8 (sun solaris):
bash-3.2$ ./print_xlsx_file_surya1.pl
test.xlsx
8->sheet$VAR1 = 'maxcol';
$VAR2 = 1;
$VAR3 = 'maxrow';
$VAR4 = 1;
$VAR5 = 'A1';
$VAR6 = '0.99';
$VAR7 = 'label';
$VAR8 = 'Sheet1';
$VAR9 = 'attr';
$VAR10 = [];
$VAR11 = 'cell';
$VAR12 = [
[],
[
undef,
'0.98880000000000001'
]
];
Rate in xlsx file-> 0.99
####
The same Read.pm is printing the below in linux version:
:/cmpnt/slt1.0/devlp/SLTICT01/WORK/cmac6844>./print_xlsx_file_surya1.pl
test.xlsx
8->sheet$VAR1 = 'maxcol';
$VAR2 = 5;
$VAR3 = 'maxrow';
$VAR4 = 6;
$VAR5 = 'A1';
$VAR6 = '0.9888';
$VAR7 = 'E6';
$VAR8 = '';
$VAR9 = 'label';
$VAR10 = 'Sheet1';
$VAR11 = 'attr';
$VAR12 = [];
$VAR13 = 'cell';
$VAR14 = [
[],
[
undef,
'0.9888'
],
[],
[],
[],
[
undef,
undef,
undef,
undef,
undef,
undef,
''
]
];
Rate in xlsx file-> 0.9888