From 58e422a18e68ed948a791ffba824fd67689d02df Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 29 Jan 2014 15:01:05 -0500 Subject: support locked and hidden cells (#15) --- lib/Spreadsheet/ParseXLSX.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 9043284..72d8a58 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -499,20 +499,26 @@ sub _parse_styles { } $styles->find_nodes('//fonts/font'); my @format = map { - my $alignment = $_->first_child('alignment'); + my $alignment = $_->first_child('alignment'); + my $protection = $_->first_child('protection'); Spreadsheet::ParseExcel::Format->new( IgnoreFont => !$_->att('applyFont'), IgnoreFill => !$_->att('applyFill'), IgnoreBorder => !$_->att('applyBorder'), IgnoreAlignment => !$_->att('applyAlignment'), IgnoreNumberFormat => !$_->att('applyNumberFormat'), + IgnoreProtection => !$_->att('applyProtection'), FontNo => 0+$_->att('fontId'), Font => $font[$_->att('fontId')], FmtIdx => 0+$_->att('numFmtId'), - # Lock => $iLock, - # Hidden => $iHidden, + Lock => $protection + ? $protection->att('locked') + : 0, + Hidden => $protection + ? $protection->att('hidden') + : 0, # Style => $iStyle, # Key123 => $i123, AlignH => $alignment -- cgit v1.2.3-54-g00ecf