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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Codec.Xlsx.Types

Contents

- The main types
- Lenses
  - Workbook
  - Worksheet
  - Cells
  - Row properties
- Style helpers
- Misc

Synopsis

- data Xlsx = Xlsx {
  - _xlSheets :: [(Text, Worksheet)]
  - _xlStyles :: Styles
  - _xlDefinedNames :: DefinedNames
  - _xlCustomProperties :: Map Text Variant
  - _xlDateBase :: DateBase
  }
- newtype Styles = Styles {
  - unStyles :: ByteString
  }
- newtype DefinedNames = DefinedNames [(Text, Maybe Text, Text)]
- data ColumnsProperties = ColumnsProperties {
  - cpMin :: Int
  - cpMax :: Int
  - cpWidth :: Maybe Double
  - cpStyle :: Maybe Int
  - cpHidden :: Bool
  - cpCollapsed :: Bool
  - cpBestFit :: Bool
  }
- data PageSetup = PageSetup {
  - _pageSetupBlackAndWhite :: Maybe Bool
  - _pageSetupCellComments :: Maybe CellComments
  - _pageSetupCopies :: Maybe Int
  - _pageSetupDraft :: Maybe Bool
  - _pageSetupErrors :: Maybe PrintErrors
  - _pageSetupFirstPageNumber :: Maybe Int
  - _pageSetupFitToHeight :: Maybe Int
  - _pageSetupFitToWidth :: Maybe Int
  - _pageSetupHorizontalDpi :: Maybe Int
  - _pageSetupId :: Maybe Text
  - _pageSetupOrientation :: Maybe Orientation
  - _pageSetupPageOrder :: Maybe PageOrder
  - _pageSetupPaperHeight :: Maybe Text
  - _pageSetupPaperSize :: Maybe PaperSize
  - _pageSetupPaperWidth :: Maybe Text
  - _pageSetupScale :: Maybe Int
  - _pageSetupUseFirstPageNumber :: Maybe Bool
  - _pageSetupUsePrinterDefaults :: Maybe Bool
  - _pageSetupVerticalDpi :: Maybe Int
  }
- data Worksheet = Worksheet {
  - _wsColumnsProperties :: [ColumnsProperties]
  - _wsRowPropertiesMap :: Map RowIndex RowProperties
  - _wsCells :: CellMap
  - _wsDrawing :: Maybe Drawing
  - _wsMerges :: [Range]
  - _wsSheetViews :: Maybe [SheetView]
  - _wsPageSetup :: Maybe PageSetup
  - _wsConditionalFormattings :: Map SqRef ConditionalFormatting
  - _wsDataValidations :: Map SqRef DataValidation
  - _wsPivotTables :: [PivotTable]
  - _wsAutoFilter :: Maybe AutoFilter
  - _wsTables :: [Table]
  - _wsProtection :: Maybe SheetProtection
  - _wsSharedFormulas :: Map SharedFormulaIndex SharedFormulaOptions
  - _wsState :: SheetState
  }
- data SheetState
  - = Visible
  - | Hidden
  - | VeryHidden
- type CellMap = Map (RowIndex, ColumnIndex) Cell
- data CellValue
  - = CellText Text
  - | CellDouble Double
  - | CellBool Bool
  - | CellRich [RichTextRun]
  - | CellError ErrorType
- data CellFormula = CellFormula {
  - _cellfExpression :: FormulaExpression
  - _cellfAssignsToName :: Bool
  - _cellfCalculate :: Bool
  }
- data FormulaExpression
  - = NormalFormula Formula
  - | SharedFormula SharedFormulaIndex
- newtype SharedFormulaIndex = SharedFormulaIndex Int
- data SharedFormulaOptions = SharedFormulaOptions {
  - _sfoRef :: CellRef
  - _sfoExpression :: Formula
  }
- data Cell = Cell {
  - _cellStyle :: Maybe Int
  - _cellValue :: Maybe CellValue
  - _cellComment :: Maybe Comment
  - _cellFormula :: Maybe CellFormula
  }
- data RowHeight
  - = CustomHeight !Double
  - | AutomaticHeight !Double
- data RowProperties = RowProps {
  - rowHeight :: Maybe RowHeight
  - rowStyle :: Maybe Int
  - rowHidden :: Bool
  }
- xlSheets :: Lens' Xlsx [(Text, Worksheet)]
- xlStyles :: Lens' Xlsx Styles
- xlDefinedNames :: Lens' Xlsx DefinedNames
- xlCustomProperties :: Lens' Xlsx (Map Text Variant)
- xlDateBase :: Lens' Xlsx DateBase
- wsColumnsProperties :: Lens' Worksheet [ColumnsProperties]
- wsRowPropertiesMap :: Lens' Worksheet (Map RowIndex RowProperties)
- wsCells :: Lens' Worksheet CellMap
- wsDrawing :: Lens' Worksheet (Maybe Drawing)
- wsMerges :: Lens' Worksheet [Range]
- wsSheetViews :: Lens' Worksheet (Maybe [SheetView])
- wsPageSetup :: Lens' Worksheet (Maybe PageSetup)
- wsConditionalFormattings :: Lens' Worksheet (Map SqRef ConditionalFormatting)
- wsDataValidations :: Lens' Worksheet (Map SqRef DataValidation)
- wsPivotTables :: Lens' Worksheet [PivotTable]
- wsAutoFilter :: Lens' Worksheet (Maybe AutoFilter)
- wsTables :: Lens' Worksheet [Table]
- wsProtection :: Lens' Worksheet (Maybe SheetProtection)
- wsSharedFormulas :: Lens' Worksheet (Map SharedFormulaIndex SharedFormulaOptions)
- wsState :: Lens' Worksheet SheetState
- cellValue :: Lens' Cell (Maybe CellValue)
- cellStyle :: Lens' Cell (Maybe Int)
- cellComment :: Lens' Cell (Maybe Comment)
- cellFormula :: Lens' Cell (Maybe CellFormula)
- rowHeightLens :: Lens' RowProperties (Maybe RowHeight)
- _CustomHeight :: Prism' RowHeight Double
- _AutomaticHeight :: Prism' RowHeight Double
- emptyStyles :: Styles
- renderStyleSheet :: StyleSheet -> Styles
- parseStyleSheet :: Styles -> Either SomeException StyleSheet
- simpleCellFormula :: Text -> CellFormula
- sharedFormulaByIndex :: SharedFormulaIndex -> CellFormula
- def :: Default a => a
- toRows :: CellMap -> [(RowIndex, [(ColumnIndex, Cell)])]
- fromRows :: [(RowIndex, [(ColumnIndex, Cell)])] -> CellMap
- module Codec.Xlsx.Types.Variant
- module Codec.Xlsx.Types.Table
- module Codec.Xlsx.Types.StyleSheet
- module Codec.Xlsx.Types.SheetViews
- module Codec.Xlsx.Types.RichText
- module Codec.Xlsx.Types.Protection
- module Codec.Xlsx.Types.PivotTable
- module Codec.Xlsx.Types.PageSetup
- module Codec.Xlsx.Types.Drawing.Common
- module Codec.Xlsx.Types.Drawing.Chart
- module Codec.Xlsx.Types.Drawing
- module Codec.Xlsx.Types.DataValidation
- module Codec.Xlsx.Types.ConditionalFormatting
- module Codec.Xlsx.Types.Common
- module Codec.Xlsx.Types.Comment
- module Codec.Xlsx.Types.AutoFilter

# The main types

data Xlsx Source #

Structured representation of Xlsx file (currently a subset of its contents)

Constructors

Xlsx |

Fields

- _xlSheets :: [(Text, Worksheet)]
- _xlStyles :: Styles
- _xlDefinedNames :: DefinedNames
- _xlCustomProperties :: Map Text Variant
- _xlDateBase :: DateBase

  date base to use when converting serial value (i.e. 'CellDouble d') into date-time. Default value is `DateBase1900`

  See also 18.17.4.1 "Date Conversion for Serial Date-Times" (p. 2067)

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types

type Rep Xlsx = D1 ('MetaData "Xlsx" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Xlsx" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_xlSheets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(Text, Worksheet)]) :*: S1 ('MetaSel ('Just "_xlStyles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Styles)) :*: (S1 ('MetaSel ('Just "_xlDefinedNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DefinedNames) :*: (S1 ('MetaSel ('Just "_xlCustomProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Variant)) :*: S1 ('MetaSel ('Just "_xlDateBase") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DateBase)))))

newtype Styles Source #

Raw worksheet styles, for structured implementation see `StyleSheet` and functions in Codec.Xlsx.Types.StyleSheet

Constructors

Styles |

Fields

- unStyles :: ByteString

#### Instances

Instances details

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

newtype DefinedNames Source #

Defined names

Each defined name consists of a name, an optional local sheet ID, and a value.

This element defines the collection of defined names for this workbook. Defined names are descriptive names to represent cells, ranges of cells, formulas, or constant values. Defined names can be used to represent a range on any worksheet.

Excel also defines a number of reserved names with a special interpretation:

- `_xlnm.Print_Area` specifies the workbook's print area. Example value: `SheetName!$A:$A,SheetName!$1:$4`
- `_xlnm.Print_Titles` specifies the row(s) or column(s) to repeat at the top of each printed page.
- `_xlnm.Sheet_Title`:refers to a sheet title.

and others. See Section 18.2.6, "definedNames (Defined Names)" (p. 1728) of the spec (second edition).

NOTE: Right now this is only a minimal implementation of defined names.

Constructors

DefinedNames [(Text, Maybe Text, Text)] |

#### Instances

Instances details

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

data ColumnsProperties Source #

Column range (from cwMin to cwMax) properties

Constructors

ColumnsProperties |

Fields

- cpMin :: Int

  First column affected by this `ColumnWidth` record.

- cpMax :: Int

  Last column affected by this `ColumnWidth` record.

- cpWidth :: Maybe Double

  Column width measured as the number of characters of the maximum digit width of the numbers 0, 1, 2, ..., 9 as rendered in the normal style's font.

  See longer description in Section 18.3.1.13 "col (Column Width & Formatting)" (p. 1605)

- cpStyle :: Maybe Int

  Default style for the affected column(s). Affects cells not yet allocated in the column(s). In other words, this style applies to new columns.

- cpHidden :: Bool

  Flag indicating if the affected column(s) are hidden on this worksheet.

- cpCollapsed :: Bool

  Flag indicating if the outlining of the affected column(s) is in the collapsed state.

- cpBestFit :: Bool

  Flag indicating if the specified column(s) is set to 'best fit'.

#### Instances

Instances details

Generic ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Associated Types type Rep ColumnsProperties :: Type -> Type Source # Methods from :: ColumnsProperties -> Rep ColumnsProperties x Source # to :: Rep ColumnsProperties x -> ColumnsProperties Source #
Show ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods showsPrec :: Int -> ColumnsProperties -> ShowS Source # show :: ColumnsProperties -> String Source # showList :: [ColumnsProperties] -> ShowS Source #
NFData ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods rnf :: ColumnsProperties -> () Source #
Eq ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods (==) :: ColumnsProperties -> ColumnsProperties -> Bool Source # (/=) :: ColumnsProperties -> ColumnsProperties -> Bool Source #
FromCursor ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods fromCursor :: Cursor -> [ColumnsProperties] Source #
FromXenoNode ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods fromXenoNode :: Node -> Either Text ColumnsProperties Source #
ToElement ColumnsProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods toElement :: Name -> ColumnsProperties -> Element Source #
type Rep ColumnsProperties Source # |

Instance details

Defined in Codec.Xlsx.Types

type Rep ColumnsProperties = D1 ('MetaData "ColumnsProperties" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "ColumnsProperties" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cpMin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "cpMax") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "cpWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)))) :*: ((S1 ('MetaSel ('Just "cpStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "cpHidden") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "cpCollapsed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "cpBestFit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))

data PageSetup Source #

Constructors

PageSetup |

Fields

- _pageSetupBlackAndWhite :: Maybe Bool

  Print black and white.

- _pageSetupCellComments :: Maybe CellComments

  This attribute specifies how to print cell comments.

- _pageSetupCopies :: Maybe Int

  Number of copies to print.

- _pageSetupDraft :: Maybe Bool

  Print without graphics.

- _pageSetupErrors :: Maybe PrintErrors

  Specifies how to print cell values for cells with errors.

- _pageSetupFirstPageNumber :: Maybe Int

  Page number for first printed page. If no value is specified, then `automatic` is assumed.

- _pageSetupFitToHeight :: Maybe Int

  Number of vertical pages to fit on.

- _pageSetupFitToWidth :: Maybe Int

  Number of horizontal pages to fit on.

- _pageSetupHorizontalDpi :: Maybe Int

  Horizontal print resolution of the device.

- _pageSetupId :: Maybe Text

  Relationship Id of the devMode printer settings part.

  (Explicit reference to a parent XML element.)

  See 22.8.2.1 "ST_RelationshipId (Explicit Relationship ID)" (p. 3784)

- _pageSetupOrientation :: Maybe Orientation

  Orientation of the page.

- _pageSetupPageOrder :: Maybe PageOrder

  Order of printed pages

- _pageSetupPaperHeight :: Maybe Text

  Height of custom paper as a number followed by a unit identifier.

  When paperHeight and paperWidth are specified, paperSize shall be ignored. Examples: `"297mm"`, `"11in"`.

  See 22.9.2.12 "ST_PositiveUniversalMeasure (Positive Universal Measurement)" (p. 3792)

- _pageSetupPaperSize :: Maybe PaperSize

  Pager size

  When paperHeight, paperWidth, and paperUnits are specified, paperSize should be ignored.

- _pageSetupPaperWidth :: Maybe Text

  Width of custom paper as a number followed by a unit identifier

  Examples: `21cm`, `8.5in`

  When paperHeight and paperWidth are specified, paperSize shall be ignored.

- _pageSetupScale :: Maybe Int

  Print scaling.

  This attribute is restricted to values ranging from 10 to 400. This setting is overridden when fitToWidth and/or fitToHeight are in use.

- _pageSetupUseFirstPageNumber :: Maybe Bool

  Use `_pageSetupFirstPageNumber` value for first page number, and do not auto number the pages.

- _pageSetupUsePrinterDefaults :: Maybe Bool

  Use the printer’s defaults settings for page setup values and don't use the default values specified in the schema.

  Example: If dpi is not present or specified in the XML, the application must not assume 600dpi as specified in the schema as a default and instead must let the printer specify the default dpi.

- _pageSetupVerticalDpi :: Maybe Int

  Vertical print resolution of the device.

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.PageSetup

Methods

compare :: PageSetup -> PageSetup -> Ordering Source #

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

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

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

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

max :: PageSetup -> PageSetup -> PageSetup Source #

min :: PageSetup -> PageSetup -> PageSetup Source #

FromCursor PageSetup Source # | See `CT_PageSetup`, p. 3922
Instance details Defined in Codec.Xlsx.Types.PageSetup Methods fromCursor :: Cursor -> [PageSetup] Source #
FromXenoNode PageSetup Source # |
Instance details Defined in Codec.Xlsx.Types.PageSetup Methods fromXenoNode :: Node -> Either Text PageSetup Source #
ToElement PageSetup Source # | See `CT_PageSetup`, p. 3922
Instance details Defined in Codec.Xlsx.Types.PageSetup Methods toElement :: Name -> PageSetup -> Element Source #
type Rep PageSetup Source # |

Instance details

Defined in Codec.Xlsx.Types.PageSetup

type Rep PageSetup = D1 ('MetaData "PageSetup" "Codec.Xlsx.Types.PageSetup" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "PageSetup" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "_pageSetupBlackAndWhite") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "_pageSetupCellComments") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CellComments))) :*: (S1 ('MetaSel ('Just "_pageSetupCopies") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "_pageSetupDraft") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "_pageSetupErrors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PrintErrors)) :*: S1 ('MetaSel ('Just "_pageSetupFirstPageNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "_pageSetupFitToHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "_pageSetupFitToWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "_pageSetupHorizontalDpi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))) :*: (((S1 ('MetaSel ('Just "_pageSetupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_pageSetupOrientation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Orientation))) :*: (S1 ('MetaSel ('Just "_pageSetupPageOrder") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PageOrder)) :*: (S1 ('MetaSel ('Just "_pageSetupPaperHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_pageSetupPaperSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PaperSize))))) :*: ((S1 ('MetaSel ('Just "_pageSetupPaperWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "_pageSetupScale") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "_pageSetupUseFirstPageNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "_pageSetupUsePrinterDefaults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "_pageSetupVerticalDpi") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))))))))

data Worksheet Source #

Xlsx worksheet

Constructors

Worksheet |

Fields

- _wsColumnsProperties :: [ColumnsProperties]

  column widths

- _wsRowPropertiesMap :: Map RowIndex RowProperties

  custom row properties (height, style) map

- _wsCells :: CellMap

  data mapped by (row, column) pairs

- _wsDrawing :: Maybe Drawing

  SpreadsheetML Drawing

- _wsMerges :: [Range]

  list of cell merges

- _wsSheetViews :: Maybe [SheetView]
- _wsPageSetup :: Maybe PageSetup
- _wsConditionalFormattings :: Map SqRef ConditionalFormatting
- _wsDataValidations :: Map SqRef DataValidation
- _wsPivotTables :: [PivotTable]
- _wsAutoFilter :: Maybe AutoFilter
- _wsTables :: [Table]
- _wsProtection :: Maybe SheetProtection
- _wsSharedFormulas :: Map SharedFormulaIndex SharedFormulaOptions
- _wsState :: SheetState

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types

type Rep Worksheet = D1 ('MetaData "Worksheet" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Worksheet" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_wsColumnsProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ColumnsProperties]) :*: (S1 ('MetaSel ('Just "_wsRowPropertiesMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map RowIndex RowProperties)) :*: S1 ('MetaSel ('Just "_wsCells") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CellMap))) :*: ((S1 ('MetaSel ('Just "_wsDrawing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Drawing)) :*: S1 ('MetaSel ('Just "_wsMerges") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Range])) :*: (S1 ('MetaSel ('Just "_wsSheetViews") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [SheetView])) :*: S1 ('MetaSel ('Just "_wsPageSetup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PageSetup))))) :*: (((S1 ('MetaSel ('Just "_wsConditionalFormattings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map SqRef ConditionalFormatting)) :*: S1 ('MetaSel ('Just "_wsDataValidations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map SqRef DataValidation))) :*: (S1 ('MetaSel ('Just "_wsPivotTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PivotTable]) :*: S1 ('MetaSel ('Just "_wsAutoFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AutoFilter)))) :*: ((S1 ('MetaSel ('Just "_wsTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Table]) :*: S1 ('MetaSel ('Just "_wsProtection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SheetProtection))) :*: (S1 ('MetaSel ('Just "_wsSharedFormulas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map SharedFormulaIndex SharedFormulaOptions)) :*: S1 ('MetaSel ('Just "_wsState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SheetState))))))

data SheetState Source #

Sheet visibility state cf. Ecma Office Open XML Part 1: 18.18.68 ST_SheetState (Sheet Visibility Types) * "visible" Indicates the sheet is visible (default) * "hidden" Indicates the workbook window is hidden, but can be shown by the user via the user interface. * "veryHidden" Indicates the sheet is hidden and cannot be shown in the user interface (UI). This state is only available programmatically.

Constructors

Visible | state="visible"
Hidden | state="hidden"
VeryHidden | state="veryHidden"

#### Instances

Instances details

Generic SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Associated Types type Rep SheetState :: Type -> Type Source # Methods from :: SheetState -> Rep SheetState x Source # to :: Rep SheetState x -> SheetState Source #
Show SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods showsPrec :: Int -> SheetState -> ShowS Source # show :: SheetState -> String Source # showList :: [SheetState] -> ShowS Source #
Default SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods def :: SheetState #
NFData SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods rnf :: SheetState -> () Source #
Eq SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods (==) :: SheetState -> SheetState -> Bool Source # (/=) :: SheetState -> SheetState -> Bool Source #
FromAttrVal SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods fromAttrVal :: Reader SheetState Source #
FromAttrBs SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods fromAttrBs :: ByteString -> Either Text SheetState Source #
ToAttrVal SheetState Source # |
Instance details Defined in Codec.Xlsx.Types Methods toAttrVal :: SheetState -> Text Source #
type Rep SheetState Source # |
Instance details Defined in Codec.Xlsx.Types type Rep SheetState = D1 ('MetaData "SheetState" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Visible" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Hidden" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VeryHidden" 'PrefixI 'False) (U1 :: Type -> Type)))

type CellMap = Map (RowIndex, ColumnIndex) Cell Source #

Map containing cell values which are indexed by row and column if you need to use more traditional (x,y) indexing please you could use corresponding accessors from '`Lens'`

data CellValue Source #

Cell values include text, numbers and booleans, standard includes date format also but actually dates are represented by numbers with a date format assigned to a cell containing it Specification (ECMA-376): - 18.3.1.4 c (Cell) - 18.18.11 ST_CellType (Cell Type)

Constructors

CellText Text |
CellDouble Double |
CellBool Bool |
CellRich [RichTextRun] |
CellError ErrorType |

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Common

Methods

compare :: CellValue -> CellValue -> Ordering Source #

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

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

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

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

max :: CellValue -> CellValue -> CellValue Source #

min :: CellValue -> CellValue -> CellValue Source #

type Rep CellValue Source # |

Instance details

Defined in Codec.Xlsx.Types.Common

type Rep CellValue = D1 ('MetaData "CellValue" "Codec.Xlsx.Types.Common" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) ((C1 ('MetaCons "CellText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "CellDouble" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: (C1 ('MetaCons "CellBool" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :+: (C1 ('MetaCons "CellRich" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [RichTextRun])) :+: C1 ('MetaCons "CellError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorType)))))

data CellFormula Source #

Formula for the cell.

TODO: array, dataTable formula types support

See 18.3.1.40 "f (Formula)" (p. 1636)

Constructors

CellFormula |

Fields

- _cellfExpression :: FormulaExpression
- _cellfAssignsToName :: Bool

  Specifies that this formula assigns a value to a name.

- _cellfCalculate :: Bool

  Indicates that this formula needs to be recalculated the next time calculation is performed. [Example: This is always set on volatile functions, like =RAND(), and circular references. end example]

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Cell

type Rep CellFormula = D1 ('MetaData "CellFormula" "Codec.Xlsx.Types.Cell" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "CellFormula" 'PrefixI 'True) (S1 ('MetaSel ('Just "_cellfExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FormulaExpression) :*: (S1 ('MetaSel ('Just "_cellfAssignsToName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_cellfCalculate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

data FormulaExpression Source #

formula type with type-specific options

Constructors

NormalFormula Formula |
SharedFormula SharedFormulaIndex |

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Cell

type Rep FormulaExpression = D1 ('MetaData "FormulaExpression" "Codec.Xlsx.Types.Cell" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "NormalFormula" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Formula)) :+: C1 ('MetaCons "SharedFormula" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SharedFormulaIndex)))

newtype SharedFormulaIndex Source #

index of shared formula in worksheet's `wsSharedFormulas` property

Constructors

SharedFormulaIndex Int |

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Cell

Methods

compare :: SharedFormulaIndex -> SharedFormulaIndex -> Ordering Source #

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

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

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

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

max :: SharedFormulaIndex -> SharedFormulaIndex -> SharedFormulaIndex Source #

min :: SharedFormulaIndex -> SharedFormulaIndex -> SharedFormulaIndex Source #

FromAttrVal SharedFormulaIndex Source # |
Instance details Defined in Codec.Xlsx.Types.Cell Methods fromAttrVal :: Reader SharedFormulaIndex Source #
FromAttrBs SharedFormulaIndex Source # |
Instance details Defined in Codec.Xlsx.Types.Cell Methods fromAttrBs :: ByteString -> Either Text SharedFormulaIndex Source #
ToAttrVal SharedFormulaIndex Source # |
Instance details Defined in Codec.Xlsx.Types.Cell Methods toAttrVal :: SharedFormulaIndex -> Text Source #
type Rep SharedFormulaIndex Source # |
Instance details Defined in Codec.Xlsx.Types.Cell type Rep SharedFormulaIndex = D1 ('MetaData "SharedFormulaIndex" "Codec.Xlsx.Types.Cell" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'True) (C1 ('MetaCons "SharedFormulaIndex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data SharedFormulaOptions Source #

Constructors

SharedFormulaOptions |

Fields

- _sfoRef :: CellRef
- _sfoExpression :: Formula

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Cell

type Rep SharedFormulaOptions = D1 ('MetaData "SharedFormulaOptions" "Codec.Xlsx.Types.Cell" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "SharedFormulaOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sfoRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CellRef) :*: S1 ('MetaSel ('Just "_sfoExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Formula)))

data Cell Source #

Currently cell details include cell values, style ids and cell formulas (inline strings from `<is>` subelements are ignored)

Constructors

Cell |

Fields

- _cellStyle :: Maybe Int
- _cellValue :: Maybe CellValue
- _cellComment :: Maybe Comment
- _cellFormula :: Maybe CellFormula

#### Instances

Instances details

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

Instance details

Defined in Codec.Xlsx.Types.Cell

type Rep Cell = D1 ('MetaData "Cell" "Codec.Xlsx.Types.Cell" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "Cell" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_cellStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "_cellValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CellValue))) :*: (S1 ('MetaSel ('Just "_cellComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Comment)) :*: S1 ('MetaSel ('Just "_cellFormula") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe CellFormula)))))

data RowHeight Source #

Height of a row in points (1/72in)

Constructors

CustomHeight !Double | Row height is set by the user
AutomaticHeight !Double | Row height is set automatically by the program

#### Instances

Instances details

Generic RowHeight Source # |
Instance details Defined in Codec.Xlsx.Types Associated Types type Rep RowHeight :: Type -> Type Source # Methods from :: RowHeight -> Rep RowHeight x Source # to :: Rep RowHeight x -> RowHeight Source #
Read RowHeight Source # |
Instance details Defined in Codec.Xlsx.Types Methods readsPrec :: Int -> ReadS RowHeight Source # readList :: ReadS [RowHeight] Source # readPrec :: ReadPrec RowHeight Source # readListPrec :: ReadPrec [RowHeight] Source #
Show RowHeight Source # |
Instance details Defined in Codec.Xlsx.Types Methods showsPrec :: Int -> RowHeight -> ShowS Source # show :: RowHeight -> String Source # showList :: [RowHeight] -> ShowS Source #
NFData RowHeight Source # |
Instance details Defined in Codec.Xlsx.Types Methods rnf :: RowHeight -> () Source #
Eq RowHeight Source # |
Instance details Defined in Codec.Xlsx.Types Methods (==) :: RowHeight -> RowHeight -> Bool Source # (/=) :: RowHeight -> RowHeight -> Bool Source #
Ord RowHeight Source # |

Instance details

Defined in Codec.Xlsx.Types

Methods

compare :: RowHeight -> RowHeight -> Ordering Source #

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

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

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

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

max :: RowHeight -> RowHeight -> RowHeight Source #

min :: RowHeight -> RowHeight -> RowHeight Source #

type Rep RowHeight Source # |

Instance details

Defined in Codec.Xlsx.Types

type Rep RowHeight = D1 ('MetaData "RowHeight" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "CustomHeight" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "AutomaticHeight" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)))

data RowProperties Source #

Properties of a row. See §18.3.1.73 "row (Row)" for more details

Constructors

RowProps |

Fields

- rowHeight :: Maybe RowHeight

  Row height in points

- rowStyle :: Maybe Int

  Style to be applied to row

- rowHidden :: Bool

  Whether row is visible or not

#### Instances

Instances details

Generic RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Associated Types type Rep RowProperties :: Type -> Type Source # Methods from :: RowProperties -> Rep RowProperties x Source # to :: Rep RowProperties x -> RowProperties Source #
Read RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods readsPrec :: Int -> ReadS RowProperties Source # readList :: ReadS [RowProperties] Source # readPrec :: ReadPrec RowProperties Source # readListPrec :: ReadPrec [RowProperties] Source #
Show RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods showsPrec :: Int -> RowProperties -> ShowS Source # show :: RowProperties -> String Source # showList :: [RowProperties] -> ShowS Source #
Default RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods def :: RowProperties #
NFData RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods rnf :: RowProperties -> () Source #
Eq RowProperties Source # |
Instance details Defined in Codec.Xlsx.Types Methods (==) :: RowProperties -> RowProperties -> Bool Source # (/=) :: RowProperties -> RowProperties -> Bool Source #
Ord RowProperties Source # |

Instance details

Defined in Codec.Xlsx.Types

Methods

compare :: RowProperties -> RowProperties -> Ordering Source #

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

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

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

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

max :: RowProperties -> RowProperties -> RowProperties Source #

min :: RowProperties -> RowProperties -> RowProperties Source #

type Rep RowProperties Source # |

Instance details

Defined in Codec.Xlsx.Types

type Rep RowProperties = D1 ('MetaData "RowProperties" "Codec.Xlsx.Types" "xlsx-1.1.2.2-DopzEu8STPN4igxHgE9OUe" 'False) (C1 ('MetaCons "RowProps" 'PrefixI 'True) (S1 ('MetaSel ('Just "rowHeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe RowHeight)) :*: (S1 ('MetaSel ('Just "rowStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "rowHidden") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))

# Lenses

## Workbook

xlSheets :: Lens' Xlsx [(Text, Worksheet)] Source #

xlStyles :: Lens' Xlsx Styles Source #

xlDefinedNames :: Lens' Xlsx DefinedNames Source #

xlCustomProperties :: Lens' Xlsx (Map Text Variant) Source #

xlDateBase :: Lens' Xlsx DateBase Source #

## Worksheet

wsColumnsProperties :: Lens' Worksheet [ColumnsProperties] Source #

wsRowPropertiesMap :: Lens' Worksheet (Map RowIndex RowProperties) Source #

wsCells :: Lens' Worksheet CellMap Source #

wsDrawing :: Lens' Worksheet (Maybe Drawing) Source #

wsMerges :: Lens' Worksheet [Range] Source #

wsSheetViews :: Lens' Worksheet (Maybe [SheetView]) Source #

wsPageSetup :: Lens' Worksheet (Maybe PageSetup) Source #

wsConditionalFormattings :: Lens' Worksheet (Map SqRef ConditionalFormatting) Source #

wsDataValidations :: Lens' Worksheet (Map SqRef DataValidation) Source #

wsPivotTables :: Lens' Worksheet [PivotTable] Source #

wsAutoFilter :: Lens' Worksheet (Maybe AutoFilter) Source #

wsTables :: Lens' Worksheet [Table] Source #

wsProtection :: Lens' Worksheet (Maybe SheetProtection) Source #

wsSharedFormulas :: Lens' Worksheet (Map SharedFormulaIndex SharedFormulaOptions) Source #

wsState :: Lens' Worksheet SheetState Source #

## Cells

cellValue :: Lens' Cell (Maybe CellValue) Source #

cellStyle :: Lens' Cell (Maybe Int) Source #

cellComment :: Lens' Cell (Maybe Comment) Source #

cellFormula :: Lens' Cell (Maybe CellFormula) Source #

## Row properties

rowHeightLens :: Lens' RowProperties (Maybe RowHeight) Source #

_CustomHeight :: Prism' RowHeight Double Source #

_AutomaticHeight :: Prism' RowHeight Double Source #

# Style helpers

emptyStyles :: Styles Source #

renderStyleSheet :: StyleSheet -> Styles Source #

Render `StyleSheet`

This is used to render a structured `StyleSheet` into a raw XML `Styles` document. Actually replacing `Styles` with `StyleSheet` would mean we would need to write a parser for `StyleSheet` as well (and would moreover require that we support the full style sheet specification, which is still quite a bit of work).

parseStyleSheet :: Styles -> Either SomeException StyleSheet Source #

Parse `StyleSheet`

This is used to parse raw `Styles` into structured `StyleSheet` currently not all of the style sheet specification is supported so parser (and the data model) is to be completed

# Misc

simpleCellFormula :: Text -> CellFormula Source #

sharedFormulaByIndex :: SharedFormulaIndex -> CellFormula Source #

def :: Default a => a #

toRows :: CellMap -> [(RowIndex, [(ColumnIndex, Cell)])] Source #

converts cells mapped by (row, column) into rows which contain row index and cells as pairs of column indices and cell values

fromRows :: [(RowIndex, [(ColumnIndex, Cell)])] -> CellMap Source #

reverse to `toRows`

module Codec.Xlsx.Types.Variant

module Codec.Xlsx.Types.Table

module Codec.Xlsx.Types.StyleSheet

module Codec.Xlsx.Types.SheetViews

module Codec.Xlsx.Types.RichText

module Codec.Xlsx.Types.Protection

module Codec.Xlsx.Types.PivotTable

module Codec.Xlsx.Types.PageSetup

module Codec.Xlsx.Types.Drawing.Common

module Codec.Xlsx.Types.Drawing.Chart

module Codec.Xlsx.Types.Drawing

module Codec.Xlsx.Types.DataValidation

module Codec.Xlsx.Types.ConditionalFormatting

module Codec.Xlsx.Types.Common

module Codec.Xlsx.Types.Comment

module Codec.Xlsx.Types.AutoFilter