All Projects → jmaister → Excellentexport

jmaister / Excellentexport

Licence: mit
Javascript export to Excel

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Excellentexport

Portphp
Data import/export framework for PHP
Stars: ✭ 225 (-77.9%)
Mutual labels:  excel, csv, export
Laracsv
A Laravel package to easily generate CSV files from Eloquent model
Stars: ✭ 583 (-42.73%)
Mutual labels:  excel, csv, export
sheet2dict
Simple XLSX and CSV to dictionary converter
Stars: ✭ 206 (-79.76%)
Mutual labels:  export, csv, excel
Simple Excel
Read and write simple Excel and CSV files
Stars: ✭ 502 (-50.69%)
Mutual labels:  excel, csv, export
Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (-23.28%)
Mutual labels:  excel, csv, export
Rows
A common, beautiful interface to tabular data, no matter the format
Stars: ✭ 739 (-27.41%)
Mutual labels:  excel, hacktoberfest, csv
Pyetl
python ETL framework
Stars: ✭ 33 (-96.76%)
Mutual labels:  excel, csv, export
Es2csv
Export from an Elasticsearch into a CSV file
Stars: ✭ 465 (-54.32%)
Mutual labels:  csv, export
Rio
A Swiss-Army Knife for Data I/O
Stars: ✭ 467 (-54.13%)
Mutual labels:  excel, csv
Tabula
Tabula is a tool for liberating data tables trapped inside PDF files
Stars: ✭ 5,420 (+432.42%)
Mutual labels:  excel, csv
Sqlitebiter
A CLI tool to convert CSV / Excel / HTML / JSON / Jupyter Notebook / LDJSON / LTSV / Markdown / SQLite / SSV / TSV / Google-Sheets to a SQLite database file.
Stars: ✭ 601 (-40.96%)
Mutual labels:  excel, csv
Dataproofer
A proofreader for your data
Stars: ✭ 628 (-38.31%)
Mutual labels:  excel, csv
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+2697.54%)
Mutual labels:  excel, csv
Excelmerge
GUI Diff Tool for Excel
Stars: ✭ 425 (-58.25%)
Mutual labels:  excel, csv
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (-58.55%)
Mutual labels:  excel, csv
React Spreadsheet
Simple, customizable yet performant spreadsheet for React
Stars: ✭ 393 (-61.39%)
Mutual labels:  excel, csv
Exporter
Lightweight Exporter library
Stars: ✭ 384 (-62.28%)
Mutual labels:  csv, export
Pyexcel
Single API for reading, manipulating and writing data in csv, ods, xls, xlsx and xlsm files
Stars: ✭ 902 (-11.39%)
Mutual labels:  excel, csv
Ethereum Etl
Python scripts for ETL (extract, transform and load) jobs for Ethereum blocks, transactions, ERC20 / ERC721 tokens, transfers, receipts, logs, contracts, internal transactions. Data is available in Google BigQuery https://goo.gl/oY5BCQ
Stars: ✭ 956 (-6.09%)
Mutual labels:  csv, export
Meza
A Python toolkit for processing tabular data
Stars: ✭ 374 (-63.26%)
Mutual labels:  excel, csv

Build Status Rate on Openbase Coverage Status

ExcellentExport.js

Revision history:

3.6.0

3.5.0

  • Add fixValue and fixArray functions to configuration: these configuration functions can be used to manipulate the values of the cells.
  • Update npm dependencies to fix vulnerabilities

3.4.3

  • Update npm dependencies to fix vulnerabilities

3.4.2

  • Remove ES6 function syntax to support IE11
  • Update npm dependencies to fix vulnerabilities

3.4.0

  • Configure TravisCI on GitHub
  • Update npm dependencies to fix vulnerabilities

3.3.0

  • Remove columns by index
  • Filter rows by value
  • Updated build to Webpack 4.x.x

3.2.1

  • Update npm dependencies to fix vulnerabilities

3.2.0

  • Update npm dependencies to fix vulnerabilities

3.1.0

  • Fix old API for base64 and escaping problem.

3.0.0

  • XLSX support. This bumps the build size to 640 KB.
  • New API : ExcellentExport.convert(...)
  • Autogenerate download filename.
  • Data input from arrays or HTML Tables.
  • Multiple sheets for XLS or XLSX formats.

2.1.0

  • Add Webpack build.
  • Create UMD JavaScript module. Library can be loaded as a module (import, RequireJS, AMD, etc...) or standalone as window.ExcelentExport.

2.0.3

  • Fix export as a module.
  • Changed minifier to UglifyJS.

2.0.2

  • Fix CSV Chinese characters and other special characters display error in Windows Excel.
  • Fix URL.createObjectURL(...) on Firefox.

2.0.0

  • Now it can export to big files +2MB.
  • Minimum IE 11.
  • Links open with URL.createObjectURL(...).
  • NPM package available.
  • Using Semantic versioning (2.0.0 instead of 2.0).
  • Module can be loaded standalone or with RequireJS.
  • Change license to MIT.

1.5

  • Possibility to select a CSV delimiter.
  • Bower package available.
  • Compose package available.

1.4

  • Add LICENSE.txt with GPL v3
  • UTF-8 characters fixed.

1.3

  • Added minified version

1.1

  • Added CSV data export

1.0

  • Added Excel data export

Compatibility

  • Firefox
  • Chrome
  • Internet Explorer 11+

Install

npm

npm install excellentexport --save

yarn

yarn add excellentexport

bower

bower install excellentexport

Load

Include script in your HTML:

<script type="text/javascript" src="dist/excellentexport.js"></script>

Include script in your HTML using CDN:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/excellentexport.min.js"></script>

Require.js

<script src="http://requirejs.org/docs/release/2.3.6/minified/require.js"></script>
<script>
    require(['dist/excellentexport'], function(ee) {
        window.ExcellentExport = ee;
    });
</script>

ES6 import

import ExcellentExport from 'excellentexport';

Usage

<table id="datatable">
    <tr>
        <td>100</td> <td>200</td> <td>300</td>
    </tr>
    <tr>
        <td>400</td> <td>500</td> <td>600</td>
    </tr>
</table>

<a download="somedata.xls"  onclick="return ExcellentExport.excel(this, 'datatable', 'Sheet Name Here');">Export to Excel</a>
<a download="somedata.csv"  onclick="return ExcellentExport.csv(this, 'datatable');">Export to CSV</a>
<!-- new API, xlsx -->
<a download="somedata.xlsx"  onclick="return ExcellentExport.convert({ anchor: this, filename: 'data_123.array', format: 'xlsx'},[{name: 'Sheet Name Here 1', from: {table: 'datatable'}}]);">Export to CSV</a>

API

 ExcellentExport.convert(options, sheets);

 Options:
 {
    anchor: String or HTML Element,
    format: 'xlsx' or 'xls' or 'csv',
    filename: String
 }

 Sheets must be an array of sheet configuration objects. Sheet description:
 [
    {
        name: 'Sheet 1', // Sheet name
        from: {
            table: String/Element, // Table ID or table element
            array: [...] // Array with the data. Array where each element is a row. Every row is an array of the cells.
        },
        removeColumns: [...], // Array of column indexes (from 0)
        filterRowFn: function(row) {return true}, // Function to decide which rows are returned
        fixValue: function(value, row, column) {return fixedValue} // Function to fix values, receiving value, row num, column num
        fixArray: function(array) {return array} // Function to manipulate the whole data array
        ...
    },
    {
        ...
    }, ...
]

fixValue example

This is an example for the fixValue function to handle HTML tags inside a table cell. It transforms BR to line breaks and then strips all the HTML tags.

            fixValue: (value, row, col) => {
                let v = value.replace(/<br>/gi, "\n");
                let strippedString = v.replace(/(<([^>]+)>)/gi, "");
                return strippedString;
            }

Notes

  • IE8 or lower do not support data: url schema.
  • IE9 does not support data: url schema on links.
  • IE10 and above and Edge are supported via the Microsoft-specific msOpenOrSaveBlob method.

Test

python 2.x:
    python -m SimpleHTTPServer 8000

python 3.x:
    python -m http.server 8000

Build

Install dependencies:

npm install

Build development version dist/excellentexport.js

npm run build

Build publish version of dist/excellentexport.js

npm run prod

Publish

npm publish
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].