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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Codec.Xlsx.Types.Table

Synopsis

- data Table = Table {
  - tblDisplayName :: Text
  - tblName :: Maybe Text
  - tblRef :: CellRef
  - tblColumns :: [TableColumn]
  - tblAutoFilter :: Maybe AutoFilter
  }
- data TableColumn = TableColumn {
  - tblcName :: Text
  }
- tableToDocument :: Table -> Int -> Document
- tableToElement :: Name -> Table -> Int -> Element

# Documentation

data Table Source #

Tables are ranges of data in the worksheet that have special behavior applied which allow users to better sort, analyze, format, manage, add, and delete data. Tables and table columns can also be referenced through formulas by the spreadsheet application using friendly names, making formula calculations that use tables much easier to understand and maintain. Tables provide a natural way for working with large sets of tabular data.

NOTE: as `headerRowCount` property isn't yet supported it's supposed that it's library user liability to guarantee that the 1st row of `tblRef` range contains cells with names specified in `tblColumns`

Section 18.5 "Tables" (p. 1728) Section 18.5.1 "Tables" (p. 1729) Section 18.5.1.2 "table (Table)" (p. 1730)

Constructors

Table |

Fields

- tblDisplayName :: Text

  A string representing the name of the table. This is the name that shall be used in formula references, and displayed in the UI to the spreadsheet user. This name shall not have any spaces in it, and it shall be unique amongst all other displayNames and definedNames in the workbook. The character lengths and restrictions are the same as for definedNames .

- tblName :: Maybe Text

  A string representing the name of the table that is used to reference the table programmatically through the spreadsheet applications object model. This string shall be unique per table per sheet. It has the same length and character restrictions as for displayName. By default this should be the same as the table's `tblDisplayName` . This name should also be kept in synch with the displayName when the displayName is updated in the UI by the spreadsheet user.

- tblRef :: CellRef

  The range on the relevant sheet that the table occupies expressed using A1 style referencing.

- tblColumns :: [TableColumn]

  columns of this table, specification requires any table to include at least 1 column

- tblAutoFilter :: Maybe AutoFilter

#### Instances

Instances details

Generic Table Source # |
Instance details Defined in Codec.Xlsx.Types.Table Associated Types type Rep Table :: Type -> Type Source # Methods from :: Table -> Rep Table x Source # to :: Rep Table x -> Table Source #
Show Table Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods showsPrec :: Int -> Table -> ShowS Source # show :: Table -> String Source # showList :: [Table] -> ShowS Source #
NFData Table Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods rnf :: Table -> () Source #
Eq Table Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods (==) :: Table -> Table -> Bool Source # (/=) :: Table -> Table -> Bool Source #
FromCursor Table Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods fromCursor :: Cursor -> [Table] Source #
type Rep Table Source # |

Instance details

Defined in Codec.Xlsx.Types.Table

type Rep Table = D1 ('MetaData "Table" "Codec.Xlsx.Types.Table" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Table" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tblDisplayName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "tblName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tblRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CellRef) :*: (S1 ('MetaSel ('Just "tblColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TableColumn]) :*: S1 ('MetaSel ('Just "tblAutoFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AutoFilter))))))

data TableColumn Source #

Single table column

TODO: styling information

Section 18.5.1.3 "tableColumn (Table Column)" (p. 1735)

Constructors

TableColumn |

Fields

- tblcName :: Text

  A string representing the unique caption of the table column. This is what shall be displayed in the header row in the UI, and is referenced through functions. This name shall be unique per table.

#### Instances

Instances details

Generic TableColumn Source # |
Instance details Defined in Codec.Xlsx.Types.Table Associated Types type Rep TableColumn :: Type -> Type Source # Methods from :: TableColumn -> Rep TableColumn x Source # to :: Rep TableColumn x -> TableColumn Source #
Show TableColumn Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods showsPrec :: Int -> TableColumn -> ShowS Source # show :: TableColumn -> String Source # showList :: [TableColumn] -> ShowS Source #
NFData TableColumn Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods rnf :: TableColumn -> () Source #
Eq TableColumn Source # |
Instance details Defined in Codec.Xlsx.Types.Table Methods (==) :: TableColumn -> TableColumn -> Bool Source # (/=) :: TableColumn -> TableColumn -> Bool Source #
type Rep TableColumn Source # |
Instance details Defined in Codec.Xlsx.Types.Table type Rep TableColumn = D1 ('MetaData "TableColumn" "Codec.Xlsx.Types.Table" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "TableColumn" 'PrefixI 'True) (S1 ('MetaSel ('Just "tblcName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

tableToDocument :: Table -> Int -> Document Source #

tableToElement :: Name -> Table -> Int -> Element Source #