in reply to Re: parsing excel with 5 levels of indentations
in thread parsing excel with 5 levels of indentations

i know about declaring $format
i just don't know how :\
my code is like this:
open(F,">$s{path}/perl.output"); my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse("$s{path}/$s{file}"); if ( !defined $workbook ) {die $parser->error(), ".\n"} for my $worksheet ( $workbook->worksheets() ) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( $row_min .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); next unless $cell; print "Row, Col = ($row, $col) Value = ", $cell->value(),"\n"; } } } close F;
and here i need to put indent somewhere somehow
ParseExcel.pm have this explanation:
The C<Spreadsheet::ParseExcel::Format> class has the following propert +ies: =head2 Format properties $format->{Font} $format->{AlignH} $format->{AlignV} $format->{Indent} $format->{Wrap} $format->{Shrink} $format->{Rotate} $format->{JustLast} $format->{ReadDir} $format->{BdrStyle} $format->{BdrColor} $format->{BdrDiag} $format->{Fill} $format->{Lock} $format->{Hidden} $format->{Style} These properties are generally only of interest to advanced users. Cas +ual users can skip this section.
not much so i still seeking wisdom about parsing indentations levels from xls

Replies are listed 'Best First'.
Re^3: parsing excel with 5 levels of indentations
by Happy-the-monk (Canon) on Oct 03, 2013 at 09:29 UTC

    my $cell = $worksheet->get_cell( $row, $col );

    ...

    and here i need to put indent somewhere somehow

    I haven't tried any of this, but continuing with the documentation of Spreadsheet::ParseExcel::Cell you should be able to test what my $format = $cell->get_format(); print $format->{Indent}, "\n"; is returning and build on that information.

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)

      yes, McNamara gave me the same solution
      and it works
      thanks