xls: Parse Microsoft Excel xls files (BIFF/Excel 97-2004)

[ bsd3, codec, data, library, parser, program, spreadsheet ] [ Propose Tags ] [ Report a vulnerability ]

Parse Microsoft Excel spreadsheet files in .xls file format (extension '.xls') more specifically known as 'BIFF/Excel 97-2004'.

The library is based on the C library 'https://github.com/libxls/libxls'.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
force-has-iconv

force using iconv library on Windows

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.1.3
Change log Changelog.md
Dependencies base (>=4.7 && <5), conduit (>=1.1 && <1.4), filepath (>=1.0 && <1.6), getopt-generics (>=0.11 && <0.14), resourcet (>=0.3 && <1.4), transformers (>=0.1 && <0.7), xls [details]
License BSD-3-Clause
Copyright 2016 Harendra Kumar, 2004-2014 Authors of libxls
Author Harendra Kumar
Maintainer harendra.kumar@gmail.com
Revised Revision 1 made by harendra at 2024-09-12T20:49:53Z
Category Codec, Data, Parser, Spreadsheet
Home page http://github.com/harendra-kumar/xls
Source repo head: git clone https://github.com/harendra-kumar/xls
Uploaded by harendra at 2020-05-30T14:31:07Z
Distributions
Executables xls2csv
Downloads 2345 total (21 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-05-30 [all 1 reports]

Readme for xls-0.1.3

[back to package description]

Haskell xls Parsing

Hackage Build Status Build status

xls is a Haskell library to parse Microsoft Excel spreadsheet files. It parses the xls file format (extension .xls) more specifically known as BIFF/Excel 97-2004.

It can be useful for mining data from old Microsoft Excel spreadsheets.

API

Use decodeXlsIO to get a list of all worksheets. For example to convert all worksheets in an xls file to comma separated csv:

import Data.List (intercalate)
import Data.Xls (decodeXlsIO)

xlsToCSV :: String -> IO ()
xlsToCSV file = do
    worksheets <- decodeXlsIO file
    mapM_ (mapM_ (putStrLn . intercalate ",")) worksheets

An xls2csv utility is shipped with the package. See the haddock documentation for API details.

Under the hood

The library is based on the C library libxls.

See Also

  • xlsior: Streaming Excel (xslx) file generation and parsing
  • xlsx: Excel xslx file parser/writer

Contributing

Welcome! If you would like to have something changed or added go ahead, raise an issue or send a pull request.