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

Safe HaskellNone
LanguageHaskell2010

Codec.Xlsx.Types.Common

Synopsis

Documentation

type CellRef = Text Source #

Excel cell reference (e.g. E3) See 18.18.62 ST_Ref (p. 2482)

mkCellRef :: (Int, Int) -> CellRef Source #

Render position in (row, col) format to an Excel reference.

mkCellRef (2, 4) == "D2"

fromCellRef :: CellRef -> (Int, Int) Source #

reverse to mkCellRef

Warning: the function isn't total and will throw an error if incorrect value will get passed

newtype SqRef Source #

Constructors

SqRef [CellRef] 

Instances

Eq SqRef Source # 

Methods

(==) :: SqRef -> SqRef -> Bool #

(/=) :: SqRef -> SqRef -> Bool #

Ord SqRef Source # 

Methods

compare :: SqRef -> SqRef -> Ordering #

(<) :: SqRef -> SqRef -> Bool #

(<=) :: SqRef -> SqRef -> Bool #

(>) :: SqRef -> SqRef -> Bool #

(>=) :: SqRef -> SqRef -> Bool #

max :: SqRef -> SqRef -> SqRef #

min :: SqRef -> SqRef -> SqRef #

Show SqRef Source # 

Methods

showsPrec :: Int -> SqRef -> ShowS #

show :: SqRef -> String #

showList :: [SqRef] -> ShowS #

ToAttrVal SqRef Source #

A sequence of cell references, space delimited. See 18.18.76, "ST_Sqref (Reference Sequence)", p. 2488.

Methods

toAttrVal :: SqRef -> Text Source #

FromAttrVal SqRef Source # 

data XlsxText Source #

Common type containing either simple string or rich formatted text. Used in si, comment and is elements

E.g. si spec says: "If the string is just a simple string with formatting applied at the cell level, then the String Item (si) should contain a single text element used to express the string. However, if the string in the cell is more complex - i.e., has formatting applied at the character level - then the string item shall consist of multiple rich text runs which collectively are used to express the string.". So we have either a single Text field, or else a list of RichTextRuns, each of which is some Text with layout properties.

TODO: Currently we do not support phoneticPr (Phonetic Properties, 18.4.3, p. 1723) or rPh (Phonetic Run, 18.4.6, p. 1725).

Section 18.4.8, "si (String Item)" (p. 1725)

See CT_Rst, p. 3903

newtype Formula Source #

A formula

See 18.18.35 "ST_Formula (Formula)" (p. 2457)

Constructors

Formula 

Fields

int2col :: Int -> Text Source #

convert column number (starting from 1) to its textual form (e.g. 3 -> "C")

col2int :: Text -> Int Source #

reverse to int2col