xlsx-0.7.0: Simple and incomplete Excel file parser/writer

Safe HaskellNone
LanguageHaskell2010

Codec.Xlsx.Types.Protection

Contents

Synopsis

Documentation

data SheetProtection Source #

Sheet protection options to enforce and specify that it needs to be protected

TODO: algorithms specified in the spec with hashes, salts and spin counts

See 18.3.1.85 "sheetProtection (Sheet Protection Options)" (p. 1694)

Constructors

SheetProtection 

Fields

Instances

Eq SheetProtection Source # 
Show SheetProtection Source # 
Generic SheetProtection Source # 
NFData SheetProtection Source # 

Methods

rnf :: SheetProtection -> () #

FromXenoNode SheetProtection Source # 
FromCursor SheetProtection Source # 
ToElement SheetProtection Source # 
type Rep SheetProtection Source # 
type Rep SheetProtection = D1 * (MetaData "SheetProtection" "Codec.Xlsx.Types.Protection" "xlsx-0.7.0-67d30z0rd5vGH8ecLQYdXm" False) (C1 * (MetaCons "SheetProtection" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_sprLegacyPassword") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe LegacyPassword))) (S1 * (MetaSel (Just Symbol "_sprSheet") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_sprAutoFilter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprDeleteColumns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_sprDeleteRows") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprFormatCells") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_sprFormatColumns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprFormatRows") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_sprInsertColumns") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprInsertHyperlinks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_sprInsertRows") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprObjects") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_sprPivotTables") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprScenarios") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_sprSelectLockedCells") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) ((:*:) * (S1 * (MetaSel (Just Symbol "_sprSelectUnlockedCells") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)) (S1 * (MetaSel (Just Symbol "_sprSort") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool))))))))

fullSheetProtection :: SheetProtection Source #

protection of all sheet features which could be protected

noSheetProtection :: SheetProtection Source #

no sheet protection at all

legacyPassword :: Text -> LegacyPassword Source #

Creates legacy XOR hashed password.

Note: The implementation is known to work only for ASCII symbols, if you know how to encode properly others - an email or a PR will be highly apperciated

See Part 4, 14.7.1 "Legacy Password Hash Algorithm" (p. 73) and Part 4, 15.2.3 "Additional attributes for workbookProtection element (Part 1, §18.2.29)" (p. 220) and Par 4, 15.3.1.6 "Additional attribute for sheetProtection element (Part 1, §18.3.1.85)" (p. 229)

Lenses