Hello duyet,
Just to add both methods can be used, I just test it:
my $sRGB = $parser->ColorIdxToRGB($format->{Fill}->[2]);
my $sRGB_2 = $workbook->color_idx_to_rgb($format->{Fill}->[2]);
Also from the source code of the Spreadsheet::ParseExcel:
#---------------------------------------------------------------------
+---------
# ColorIdxToRGB (for Spreadsheet::ParseExcel)
#
# Returns for most recently opened book for compatibility, use
# Workbook::color_idx_to_rgb instead
#
#---------------------------------------------------------------------
+---------
sub ColorIdxToRGB {
my ( $sPkg, $iIdx ) = @_;
unless( defined $currentbook ) {
return ( ( defined $aColor[$iIdx] ) ? $aColor[$iIdx] : $aColor[0]
+);
}
return $currentbook->color_idx_to_rgb( $iIdx );
}
Seeking for Perl wisdom...on the process of learning...not there...yet!
|