packages feed

xlsx-1.2.0: xlsx.cabal

Name:                xlsx

Version:             1.2.0

Synopsis:            Simple and incomplete Excel file parser/writer
Description:
    This library can help you to get some data read and written in Office
    Open XML xlsx format. Small subset of xlsx format is supported.
    .
    For examples look into "Codec.Xlsx".
    .
    Format is covered by ECMA-376 standard:
    <https://ecma-international.org/publications-and-standards/standards/ecma-376/>
    .
    4th edition of the standard with the transitional schema is used for this library.
Extra-source-files:
                     CHANGELOG.markdown
                     data/inline-strings.xlsx
                     data/floats.xlsx
                     data/absolute_relationships.xlsx

Homepage:            https://github.com/qrilka/xlsx
Bug-Reports:         https://github.com/qrilka/xlsx/issues
License:             MIT
License-file:        LICENSE
Author:              Tim, Max, Kirill Zaborsky
Maintainer:          qrilka@gmail.com

Category:            Codec
Build-type:          Simple
Tested-with:         GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.6, GHC == 9.8.4
Cabal-version:       >=1.10

Flag microlens
  default: False
  description: Use microlens instead of lens


Library
  Hs-source-dirs:    src
  ghc-options:       -Wall
  Exposed-modules:   Codec.Xlsx
                   , Codec.Xlsx.Types
                   , Codec.Xlsx.Formatted
                   , Codec.Xlsx.Lens
                   , Codec.Xlsx.Parser
                   , Codec.Xlsx.Parser.Internal
                   , Codec.Xlsx.Parser.Internal.Fast
                   , Codec.Xlsx.Parser.Internal.Util
                   , Codec.Xlsx.Parser.Internal.PivotTable
                   , Codec.Xlsx.Types.AutoFilter
                   , Codec.Xlsx.Types.Cell
                   , Codec.Xlsx.Types.Comment
                   , Codec.Xlsx.Types.Common
                   , Codec.Xlsx.Types.ConditionalFormatting
                   , Codec.Xlsx.Types.DataValidation
                   , Codec.Xlsx.Types.Drawing
                   , Codec.Xlsx.Types.Drawing.Chart
                   , Codec.Xlsx.Types.Drawing.Common
                   , Codec.Xlsx.Types.Internal
                   , Codec.Xlsx.Types.Internal.CfPair
                   , Codec.Xlsx.Types.Internal.CommentTable
                   , Codec.Xlsx.Types.Internal.ContentTypes
                   , Codec.Xlsx.Types.Internal.CustomProperties
                   , Codec.Xlsx.Types.Internal.DvPair
                   , Codec.Xlsx.Types.Internal.FormulaData
                   , Codec.Xlsx.Types.Internal.Relationships
                   , Codec.Xlsx.Types.Internal.SharedStringTable
                   , Codec.Xlsx.Types.PageSetup
                   , Codec.Xlsx.Types.PivotTable
                   , Codec.Xlsx.Types.PivotTable.Internal
                   , Codec.Xlsx.Types.Protection
                   , Codec.Xlsx.Types.RefId
                   , Codec.Xlsx.Types.RichText
                   , Codec.Xlsx.Types.SheetViews
                   , Codec.Xlsx.Types.StyleSheet
                   , Codec.Xlsx.Types.Table
                   , Codec.Xlsx.Types.Variant
                   , Codec.Xlsx.Writer
                   , Codec.Xlsx.Writer.Internal
                   , Codec.Xlsx.Writer.Internal.PivotTable
                   , Codec.Xlsx.Parser.Stream
                   , Codec.Xlsx.Writer.Stream
                   , Codec.Xlsx.Parser.Stream.Row
                   , Codec.Xlsx.Parser.Stream.SheetInfo
                   , Codec.Xlsx.Parser.Stream.SheetItem
                   , Codec.Xlsx.Writer.Internal.Stream

  -- The only function it exports is also hidden by the upstream library: https://github.com/the-real-blackh/hexpat/blob/master/Text/XML/Expat/SAX.hs#L227
  -- We could expose it but then this function is in the xlsx API for a long time.
  -- It be better to expose it in the upstream library instead I think. It was copied here so the parser can use it.
  Other-modules:     Codec.Xlsx.Parser.Stream.HexpatInternal
                   , Codec.Xlsx.Parser.Internal.Memoize
                   , Codec.Xlsx.Parser.Stream.SheetIdentifier
                   , Codec.Xlsx.Parser.Stream.SheetIndex
                   , Codec.Xlsx.LensCompat

  Build-depends:     base         >= 4.9.0.0 && < 5.0
                   , attoparsec
                   , base64-bytestring
                   , binary-search
                   , bytestring   >= 0.10.8.0
                   , conduit      >= 1.0.0
                   , containers   >= 0.5.0.0
                   , data-default
                   , deepseq      >= 1.4
                   , dlist
                   , errors
                   , extra
                   , filepath
                   , hexpat
                   , mtl          >= 2.1
                   , network-uri
                   , old-locale   >= 1.0.0.5
                   , safe         >= 0.3
                   , text         >= 0.11.3.1
                   , time         >= 1.4.0.1
                   , transformers >= 0.3.0.0
                   , vector       >= 0.10
                   , xeno         >= 0.3.2
                   , xml-conduit  >= 1.1.0
                   , zip-archive  >= 0.2
                   , zlib         >= 0.5.4.0
                   , zip
                   , zip-stream   >= 0.2.0.1
                   , xml-types
                   , exceptions
                   , transformers-base
                   , monad-control
  if flag(microlens)
    Build-depends:     microlens    >= 0.4 && < 0.5
                     , microlens-mtl
                     , microlens-ghc
                     , microlens-th
                     , profunctors
                     , microlens-platform
                     , indexed-traversable
    cpp-options: -DUSE_MICROLENS
  else
    Build-depends:     lens         >= 3.8 && < 5.4

  Default-Language:     Haskell2010
  Other-Extensions:  DeriveDataTypeable
                     FlexibleInstances
                     NoMonomorphismRestriction
                     OverloadedStrings
                     RankNTypes
                     RecordWildCards
                     TemplateHaskell
                     TupleSections

test-suite data-test
  type: exitcode-stdio-1.0
  main-is:  Main.hs
  hs-source-dirs: test/
  other-modules: AutoFilterTests
               , Common
               , CommonTests
               , CommonTests.CellRefTests
               , CondFmtTests
               , Diff
               , DrawingTests
               , PivotTableTests
               , StreamTests
               , Test.SmallCheck.Series.Instances
               , TestXlsx
  Build-Depends: base
               , bytestring
               , containers
               , Diff >= 0.3.0
               , directory
               , groom
               , mtl
               , raw-strings-qq
               , smallcheck
               , tasty
               , tasty-hunit
               , tasty-smallcheck
               , text
               , time
               , vector
               , xlsx
               , xml-conduit >= 1.1.0
               , conduit
               , filepath
               , deepseq
               , zip
  if flag(microlens)
    Build-depends:     microlens    >= 0.4 && < 0.5
                     , microlens-mtl
                     , microlens-platform
                     , microlens-th
    cpp-options: -DUSE_MICROLENS
  else
    Build-depends:     lens         >= 3.8 && < 5.4
  Default-Language:     Haskell2010

source-repository head
  type:     git
  location: git://github.com/qrilka/xlsx.git

benchmark bench
  type: exitcode-stdio-1.0
  hs-source-dirs: benchmarks
  main-is: Main.hs
  build-depends: base
               , bytestring
               , criterion
               , xlsx
               , deepseq
               , conduit
               , lens
  default-language: Haskell2010