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

Safe HaskellNone
LanguageHaskell2010

Codec.Xlsx.Types.Protection

Contents

Synopsis

Documentation

data SheetProtection #

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 # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Show SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Generic SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep SheetProtection :: Type -> Type #

NFData SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: SheetProtection -> () #

FromXenoNode SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromCursor SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

ToElement SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep SheetProtection # 
Instance details

Defined in Codec.Xlsx.Types.Protection

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

fullSheetProtection :: SheetProtection #

protection of all sheet features which could be protected

noSheetProtection :: SheetProtection #

no sheet protection at all

data LegacyPassword #

Instances
Eq LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Show LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Generic LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep LegacyPassword :: Type -> Type #

NFData LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: LegacyPassword -> () #

FromAttrBs LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromAttrVal LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

ToAttrVal LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep LegacyPassword # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep LegacyPassword = D1 (MetaData "LegacyPassword" "Codec.Xlsx.Types.Protection" "xlsx-0.7.2-JGGtT1sQysOJfkAOVHYL70" True) (C1 (MetaCons "LegacyPassword" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

legacyPassword :: Text -> LegacyPassword #

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