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

Safe Haskell | None
Language | Haskell2010

Codec.Xlsx.Types.Internal.SharedStringTable

Contents

- Main types

Synopsis

- newtype SharedStringTable = SharedStringTable {
  - sstTable :: Vector XlsxText
  }
- sstConstruct :: [Worksheet] -> SharedStringTable
- sstLookupText :: SharedStringTable -> Text -> Int
- sstLookupRich :: SharedStringTable -> [RichTextRun] -> Int
- sstItem :: SharedStringTable -> Int -> Maybe XlsxText
- sstEmpty :: SharedStringTable

# Main types

newtype SharedStringTable Source #

Shared string table

A workbook can contain thousands of cells containing string (non-numeric) data. Furthermore this data is very likely to be repeated across many rows or columns. The goal of implementing a single string table that is shared across the workbook is to improve performance in opening and saving the file by only reading and writing the repetitive information once.

Relevant parts of the EMCA standard (2nd edition, part 1, https://ecma-international.org/publications-and-standards/standards/ecma-376/), page numbers refer to the page in the PDF rather than the page number as printed on the page):

- Section 18.4, "Shared String Table" (p. 1712) in particular subsection 18.4.9, "sst (Shared String Table)" (p. 1726)

TODO: The `extLst` child element is currently unsupported.

Constructors

SharedStringTable |

Fields

- sstTable :: Vector XlsxText

#### Instances

Instances details

Generic SharedStringTable Source # |

Instance details

Defined in Codec.Xlsx.Types.Internal.SharedStringTable

Associated Types

type Rep SharedStringTable |
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable type Rep SharedStringTable = D1 ('MetaData "SharedStringTable" "Codec.Xlsx.Types.Internal.SharedStringTable" "xlsx-1.1.4-G0KawmQS4mL8oRGRTaTy8Y" 'True) (C1 ('MetaCons "SharedStringTable" 'PrefixI 'True) (S1 ('MetaSel ('Just "sstTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector XlsxText))))

Methods

from :: SharedStringTable -> Rep SharedStringTable x Source #

to :: Rep SharedStringTable x -> SharedStringTable Source #

Show SharedStringTable Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable Methods showsPrec :: Int -> SharedStringTable -> ShowS Source # show :: SharedStringTable -> String Source # showList :: [SharedStringTable] -> ShowS Source #
Eq SharedStringTable Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable Methods (==) :: SharedStringTable -> SharedStringTable -> Bool Source # (/=) :: SharedStringTable -> SharedStringTable -> Bool Source #
Ord SharedStringTable Source # |

Instance details

Defined in Codec.Xlsx.Types.Internal.SharedStringTable

Methods

compare :: SharedStringTable -> SharedStringTable -> Ordering Source #

(<) :: SharedStringTable -> SharedStringTable -> Bool Source #

(<=) :: SharedStringTable -> SharedStringTable -> Bool Source #

(>) :: SharedStringTable -> SharedStringTable -> Bool Source #

(>=) :: SharedStringTable -> SharedStringTable -> Bool Source #

max :: SharedStringTable -> SharedStringTable -> SharedStringTable Source #

min :: SharedStringTable -> SharedStringTable -> SharedStringTable Source #

FromCursor SharedStringTable Source # | See `CT_Sst`, p. 3902 The optional attributes `count` and `uniqCount` are being ignored at least currently
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable Methods fromCursor :: Cursor -> [SharedStringTable] Source #
ToDocument SharedStringTable Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable Methods toDocument :: SharedStringTable -> Document Source #
ToElement SharedStringTable Source # | See `CT_Sst`, p. 3902. TODO: The `count` and `uniqCount` attributes are currently unsupported.
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable Methods toElement :: Name -> SharedStringTable -> Element Source #
type Rep SharedStringTable Source # |
Instance details Defined in Codec.Xlsx.Types.Internal.SharedStringTable type Rep SharedStringTable = D1 ('MetaData "SharedStringTable" "Codec.Xlsx.Types.Internal.SharedStringTable" "xlsx-1.1.4-G0KawmQS4mL8oRGRTaTy8Y" 'True) (C1 ('MetaCons "SharedStringTable" 'PrefixI 'True) (S1 ('MetaSel ('Just "sstTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector XlsxText))))

sstConstruct :: [Worksheet] -> SharedStringTable Source #

Construct the `SharedStringsTable` from an existing document

sstLookupText :: SharedStringTable -> Text -> Int Source #

sstLookupRich :: SharedStringTable -> [RichTextRun] -> Int Source #

sstItem :: SharedStringTable -> Int -> Maybe XlsxText Source #

sstEmpty :: SharedStringTable Source #