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 ); }
In reply to Re^3: Getting the background color of a cell in an existing Excel spreadsheet
by thanos1983
in thread Getting the background color of a cell in an existing Excel spreadsheet
by venky1937
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |