module Text.XML.SpreadsheetML.Types where
import Data.Word ( Word64 )
data Workbook = Workbook
{ workbookDocumentProperties :: Maybe DocumentProperties
, workbookWorksheets :: [Worksheet]
}
deriving (Read, Show)
data DocumentProperties = DocumentProperties
{ documentPropertiesTitle :: Maybe String
, documentPropertiesSubject :: Maybe String
, documentPropertiesKeywords :: Maybe String
, documentPropertiesDescription :: Maybe String
, documentPropertiesRevision :: Maybe Word64
, documentPropertiesAppName :: Maybe String
, documentPropertiesCreated :: Maybe String
}
deriving (Read, Show)
data Worksheet = Worksheet
{ worksheetTable :: Maybe Table
, worksheetName :: Name
}
deriving (Read, Show)
data Table = Table
{ tableColumns :: [Column]
, tableRows :: [Row]
, tableDefaultColumnWidth :: Maybe Double
, tableDefaultRowHeight :: Maybe Double
, tableExpandedColumnCount :: Maybe Word64
, tableExpandedRowCount :: Maybe Word64
, tableLeftCell :: Maybe Word64
, tableTopCell :: Maybe Word64
, tableFullColumns :: Maybe Bool
, tableFullRows :: Maybe Bool
}
deriving (Read, Show)
data Column = Column
{ columnCaption :: Maybe Caption
, columnAutoFitWidth :: Maybe AutoFitWidth
, columnHidden :: Maybe Hidden
, columnIndex :: Maybe Word64
, columnSpan :: Maybe Word64
, columnWidth :: Maybe Double
}
deriving (Read, Show)
data Row = Row
{ rowCells :: [Cell]
, rowCaption :: Maybe Caption
, rowAutoFitHeight :: Maybe AutoFitHeight
, rowHeight :: Maybe Double
, rowHidden :: Maybe Hidden
, rowIndex :: Maybe Word64
, rowSpan :: Maybe Word64
}
deriving (Read, Show)
data Cell = Cell
{ cellData :: Maybe ExcelValue
, cellFormula :: Maybe Formula
, cellIndex :: Maybe Word64
, cellMergeAcross :: Maybe Word64
, cellMergeDown :: Maybe Word64
}
deriving (Read, Show)
data ExcelValue = Number Double | Boolean Bool | StringType String
deriving (Read, Show)
newtype Formula = Formula String
deriving (Read, Show)
data AutoFitWidth = AutoFitWidth | DoNotAutoFitWidth
deriving (Read, Show)
data AutoFitHeight = AutoFitHeight | DoNotAutoFitHeight
deriving (Read, Show)
data Hidden = Shown | Hidden
deriving (Read, Show)
newtype Name = Name String
deriving (Read, Show)
newtype Caption = Caption String
deriving (Read, Show)