xlsx-1.0.0.1: 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

Instances details
Eq SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Show SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Generic SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep SheetProtection :: Type -> Type #

NFData SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: SheetProtection -> () #

FromXenoNode SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromCursor SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

fromCursor :: Cursor -> [SheetProtection] Source #

ToElement SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

toElement :: Name -> SheetProtection -> Element Source #

type Rep SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep SheetProtection = D1 ('MetaData "SheetProtection" "Codec.Xlsx.Types.Protection" "xlsx-1.0.0.1-inplace" '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 Source #

protection of all sheet features which could be protected

noSheetProtection :: SheetProtection Source #

no sheet protection at all

data LegacyPassword Source #

Instances

Instances details
Eq LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Show LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Generic LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep LegacyPassword :: Type -> Type #

NFData LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: LegacyPassword -> () #

FromAttrBs LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromAttrVal LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

ToAttrVal LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

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

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