Skip to main content

Data services and visualization

Project description

Put together some CSV files into a single Excel file, in different sheets.

Installation

You can install directly after cloning:

$ python setup.py install --user

Or use the Python package:

$ pip install --user csv2xls

Dependency

Outside the standard library, the xlwt package is needed, and should be automatically installed with setuptools. Otherwise:

$ pip install --user xlwt

Usage

$ ./csv_to_xls.py -h
usage: csv_to_xls.py [-h] [-o OUTPUT] [-k] [-f] [-c] [-d DATE_FORMAT]
                     files [files ...]

Put together some CSV files into a single Excel file. Basic types are infered
automatically.

positional arguments:
  files

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Define name for output Excel file. Default is
                        output.xls.
  -k, --keep-prefix     Keep common prefix when building sheet names.
  -f, --force           If output already exists, override it.
  -c, --clean           Delete input files after successfully creating the
                        Excel file.
  -d DATE_FORMAT, --date-format DATE_FORMAT
                        Change date format used during date type inference.
                        Default is %Y-%m-%d.

Example: ./csv_to_xls.py examples/sheet_alpha.csv examples/sheet_beta.csv

Example

$ ./csv_to_xls.py examples/sheet_alpha.csv examples/sheet_beta.csv
Processing       examples/sheet_alpha.csv -> output.xls/alpha
Processing        examples/sheet_beta.csv -> output.xls/beta

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csv2xls-0.1.tar.gz (11.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page