{"_id":"@africasokoni/excellentexport","_rev":"1-f65e50e3b4e82852084b64f3effe6ea6","name":"@africasokoni/excellentexport","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@africasokoni/excellentexport","version":"1.1.0","description":"Client side JavaScript export to Excel or CSV","license":"MIT","homepage":"http://tech.africasokoni.co.ke","author":{"name":"Jordi Burgos","email":"jordiburgos@gmail.com"},"bugs":{"url":"https://github.com/sokoni-online/excellentexport/issues"},"repository":{"type":"git","url":"git://github.com/sokoni-online/excellentexport.git"},"keywords":["excel","export","csv","javascript","client","side"],"scripts":{"build":"webpack --config webpack.config.js --progress --mode development --watch","prod":"webpack --config webpack.config.js --progress --mode production","test":"jest --coverage && coveralls < coverage/lcov.info","jest":"jest --coverage","watch":"jest --watch"},"main":"dist/excellentexport.js","devDependencies":{"@babel/core":"7.16.12","@babel/plugin-proposal-class-properties":"7.16.7","@babel/plugin-transform-flow-strip-types":"7.16.7","@babel/preset-env":"7.16.11","@types/jest":"27.4.0","@types/jest-environment-puppeteer":"5.0.0","@types/node":"17.0.12","@types/puppeteer":"5.4.4","babel-loader":"8.2.3","blob-polyfill":"6.0.20211015","coveralls":"3.1.1","cross-env":"7.0.3","html-loader":"3.1.0","jest":"27.4.7","jest-puppeteer":"6.0.3","puppeteer":"13.1.2","ts-jest":"27.1.3","ts-loader":"9.2.6","ts-node":"10.4.0","typescript":"4.3.4","webdriverio":"7.16.13","webpack":"5.67.0","webpack-cli":"^4.9.2","webpack-dev-server":"4.7.3","webpack-node-externals":"3.0.0","xlsx":"0.17.5"},"resolutions":{"json-schema":"0.4.0"},"types":"./dist/excellentexport.d.ts","gitHead":"5f366905ee22ce72e60a0ddebafea5f043ed831d","_id":"@africasokoni/excellentexport@1.1.0","_nodeVersion":"14.17.3","_npmVersion":"8.1.3","dist":{"integrity":"sha512-NPjCKXad+hlOGll8M/ydLrZg47sp6CTBc5G5Jy5Adutjf0Ttymam6JnRpb/FLE6COLbPWxxtlTUlI2R/5MfSIw==","shasum":"319ba39bb7045d10066916a5018ad1b7bd66a1dd","tarball":"https://registry.npmjs.org/@africasokoni/excellentexport/-/excellentexport-1.1.0.tgz","fileCount":33,"unpackedSize":1696061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA2f+CRA9TVsSAnZWagAAFk8P/i0gSNOYNPeoYMlbkQWk\noj0TK6Wn3F18a7XVpHNbUcnBxdbKMazrVKipD2kwyv3hUt7890+GzWOtlT1b\nRApsXvSglUBkW2D51aQZut9sAL/t0vD9aDuqWwsNXSslERUgBvkCv8vnZ5U0\nrTyXIVgiNmqyvqWtCWdSSjtUbycwhRxfgduod3TBSeW7fKonwdgYEqfq/RxD\n2B8v9o0lW8dsjiLxJDW5mUkQr3T50P6jSqy6X7f4lr7l51/uZp5LZ7KhQDEG\nzwveqRg0DAZOUU69yr2gjml42kyUj8PPtO6PuLiN9mZj8ELYIn4aD35xUWhd\nT/qPmdhYOyJ4KilDQXdv5dlCXbU6s9LwuxhkwvNIlJJB7U5tT5L7au7px77X\nQpUmYQNO3PJjErNhkH1u0kf8POXWZP82vjRpPMnByn8BPmfZS+MAfps17gWG\nRrvDCKR0Km4Q4oKcLaeDZ+/pBnp5PjFV1IlkviT/bhVribLO1UMSRyUe9oSU\nLMngdTQEqqDviMYcP7Nu3QOi96wks0MtzH3kObiE7hYMvwBAyDjjbEYCcSKr\nmtjTO5PRNU5BUGPmczPv30JOu3cQ3vXTS58sFMXUQNojay0xZXln2M+TNMPT\nRZmpLSXF+9jquGIG4Y7+zsnotXGf1aLzFCyQAXdqLYcS69mA/IUQp2hJqbeu\nyDdi\r\n=6vsq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUOKZtFo2+ZWoc4gqNg3/YTloaE8FBtHvg+AotOk+6YgIgdJPuN/f3vyjv+mPOePhQirDu+w+DAaVS3EITx1+qPis="}]},"_npmUser":{"name":"felixnyamweya","email":"felixombura@gmail.com"},"directories":{},"maintainers":[{"name":"felixnyamweya","email":"felixombura@gmail.com"},{"name":"gr1d99","email":"gideon.kimutai.kim@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/excellentexport_1.1.0_1644390398185_0.5223692039213379"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-09T07:06:38.133Z","1.1.0":"2022-02-09T07:06:38.404Z","modified":"2022-04-04T11:51:23.501Z"},"maintainers":[{"name":"felixnyamweya","email":"felixombura@gmail.com"},{"name":"gr1d99","email":"gideon.kimutai.kim@gmail.com"}],"description":"Client side JavaScript export to Excel or CSV","homepage":"http://tech.africasokoni.co.ke","keywords":["excel","export","csv","javascript","client","side"],"repository":{"type":"git","url":"git://github.com/sokoni-online/excellentexport.git"},"author":{"name":"Jordi Burgos","email":"jordiburgos@gmail.com"},"bugs":{"url":"https://github.com/sokoni-online/excellentexport/issues"},"license":"MIT","readme":"\n[![Node CI](https://github.com/sokoni-online/excellentexport/actions/workflows/webpack.yml/badge.svg?branch=master)](https://github.com/sokoni-online/excellentexport/actions/workflows/webpack.yml)\n[![](https://data.jsdelivr.com/v1/package/npm/excellentexport/badge)](https://www.jsdelivr.com/package/npm/excellentexport)\n[![Rate on Openbase](https://badges.openbase.io/js/rating/excellentexport.svg)](https://openbase.io/js/excellentexport?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)\n[![Coverage Status](https://coveralls.io/repos/github/sokoni-online/excellentexport/badge.svg?branch=master)](https://coveralls.io/github/sokoni-online/excellentexport?branch=master)\n\n# ExcellentExport.js\n\n - [:heart: Sponsor ExcellentExport.js project:heart:](https://github.com/sponsors/sokoni-online)\n\n - JavaScript export to Excel or CSV.\n\n - A quick JavaScript library to create export to Excel/CSV from HTML tables in the browser. No server required.\n\n - As part of the new version 3.0.0+, there is support for _XLSX_. The drawback is that the library is 600+ KB.\n\n - If you only need _XLS_ or _CSV_, use _2.X.X_ versions.\n\n - Check My Blog Page for Testing :\n      [JavaScript export to Excel](http://jordiburgos.com/post/2013/javascript-export-to-excel.html)\n\n      [ExcellentExport.js update: JavaScript export to Excel and CSV](http://jordiburgos.com/post/2017/excellentexport-javascript-export-to-excel-csv.html)\n\n# Revision history:\n\n### Next\n\n* Activate XLSX compression by default. The example of index.bigtable.html went from 18Mb to 3Mb.\n\n### 3.8.0\n\n* Allow RTL options on the whole file or sheet.\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.7.3\n\n* Fix (#591) remove columns parameter. Now it is not affected by repeated column numbers nor its order.\n\n### 3.7.2\n\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.7.1\n\n* _Update npm dependencies to fix vulnerabilities_\n* Start using Dependabot and get rid of Dependabot-preview\n\n### 3.7.0\n\n* Added option `openAsDownload: boolean`. Use this option to download as a file without using an anchor tag. So download can be triggered from a button.\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.6.0\n\n* Added sponsor link to the project [:heart: Sponsor ExcellentExport.js project:heart:](https://github.com/sponsors/sokoni-online)\n* Transform the project from JavaScript to TypeScript\n* Configure Jest as test runner\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.5.0\n\n* Add fixValue and fixArray functions to configuration: these configuration functions can be used to manipulate the values of the cells.\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.4.3\n\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.4.2\n\n* Remove ES6 function syntax to support IE11\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.4.0\n\n* Configure TravisCI on GitHub\n* Update npm dependencies to fix vulnerabilities\n\n### 3.3.0\n\n* Remove columns by index\n* Filter rows by value\n* _Updated build to Webpack 4.x.x_\n\n### 3.2.1\n\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.2.0\n\n* _Update npm dependencies to fix vulnerabilities_\n\n### 3.1.0\n\n* Fix old API for base64 and escaping problem.\n\n### 3.0.0\n\n* XLSX support. This bumps the build size to 640 KB.\n* New API : ExcellentExport.convert(...)\n* Autogenerate download filename.\n* Data input from arrays or HTML Tables.\n* Multiple sheets for XLS or XLSX formats.\n\n### 2.1.0\n\n* Add Webpack build.\n* Create UMD JavaScript module. Library can be loaded as a module (import, RequireJS, AMD, etc...) or standalone as window.ExcelentExport.\n\n### 2.0.3\n\n* Fix export as a module.\n* Changed minifier to UglifyJS.\n\n### 2.0.2\n\n* Fix CSV Chinese characters and other special characters display error in Windows Excel.\n* Fix URL.createObjectURL(...) on Firefox.\n\n\n### 2.0.0\n\n* Now it can export to big files +2MB.\n* Minimum IE 11.\n* Links open with URL.createObjectURL(...).\n* NPM package available.\n* Using Semantic versioning (2.0.0 instead of 2.0).\n* Module can be loaded standalone or with RequireJS.\n* Change license to MIT.\n\n### 1.5\n\n* Possibility to select a CSV delimiter.\n* Bower package available.\n* Compose package available.\n\n### 1.4\n\n* _Add LICENSE.txt with GPL v3_\n* UTF-8 characters fixed.\n\n### 1.3\n\n* _Added minified version_\n\n### 1.1\n\n* _Added CSV data export_\n\n### 1.0\n\n* _Added Excel data export_\n\n## Compatibility\n\n - Firefox\n - Chrome\n - Internet Explorer 11+\n\n# Install \n\n## npm\n\n    npm install @africasokoni/excellentexport --save\n\n## yarn\n\n    yarn add @africasokoni/excellentexport\n\n## bower\n\n    bower install @africasokoni/excellentexport\n\n# Load\n\n\n**Include script in your HTML:**\n\n    <script type=\"text/javascript\" src=\"dist/excellentexport.js\"></script>\n\n**Include script in your HTML using CDN:**\n\n    <script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/excellentexport@3.4.3/dist/excellentexport.min.js\"></script>\n\n\n**Require.js**\n\n    <script src=\"http://requirejs.org/docs/release/2.3.6/minified/require.js\"></script>\n    <script>\n        require(['dist/excellentexport'], function(ee) {\n            window.ExcellentExport = ee;\n        });\n    </script>\n\n**ES6 import**\n\n    import ExcellentExport from '@africasokoni/excellentexport';\n\n\n# Usage\n\n    <table id=\"datatable\">\n        <tr>\n            <td>100</td> <td>200</td> <td>300</td>\n        </tr>\n        <tr>\n            <td>400</td> <td>500</td> <td>600</td>\n        </tr>\n    </table>\n\n    <a download=\"somedata.xls\" href=\"#\" onclick=\"return ExcellentExport.excel(this, 'datatable', 'Sheet Name Here');\">Export to Excel</a>\n    <a download=\"somedata.csv\" href=\"#\" onclick=\"return ExcellentExport.csv(this, 'datatable');\">Export to CSV</a>\n    <!-- new API, xlsx -->\n    <a download=\"somedata.xlsx\" href=\"#\" onclick=\"return ExcellentExport.convert({ anchor: this, filename: 'data_123.array', format: 'xlsx'},[{name: 'Sheet Name Here 1', from: {table: 'datatable'}}]);\">Export to CSV</a>\n\n# API\n\n     ExcellentExport.convert(options, sheets);\n\n     Options:\n     {\n        anchor: String or HTML Element,\n        format: 'xlsx' or 'xls' or 'csv',\n        filename: String,\n        rtl: Use Right-to-left characters, boolean (optional)\n     }\n\n     Sheets must be an array of sheet configuration objects. Sheet description:\n     [\n        {\n            name: 'Sheet 1', // Sheet name\n            from: {\n                table: String/Element, // Table ID or table element\n                array: [...] // Array with the data. Array where each element is a row. Every row is an array of the cells.\n            },\n            removeColumns: [...], // Array of column indexes (from 0)\n            filterRowFn: function(row) {return true}, // Function to decide which rows are returned\n            fixValue: function(value, row, column) {return fixedValue} // Function to fix values, receiving value, row num, column num\n            fixArray: function(array) {return array} // Function to manipulate the whole data array\n            rtl: Use Right-to-left characters, boolean (optional)\n            ...\n        },\n        {\n            ...\n        }, ...\n    ]\n\n## fixValue example\n\nThis is an example for the _fixValue function_ to handle HTML tags inside a table cell. \nIt transforms BR to line breaks and then strips all the HTML tags.\n\n                fixValue: (value, row, col) => {\n                    let v = value.replace(/<br>/gi, \"\\n\");\n                    let strippedString = v.replace(/(<([^>]+)>)/gi, \"\");\n                    return strippedString;\n                }\n\n\n# Notes\n\n - IE8 or lower do not support *data:* url schema.\n - IE9 does not support *data:* url schema on links.\n - IE10 and above and Edge are supported via the Microsoft-specific `msOpenOrSaveBlob` method.\n\n# Test\n\n    python 2.x:\n        python -m SimpleHTTPServer 8000\n\n    python 3.x:\n        python -m http.server 8000\n\n# Build\n\n**Install dependencies:**\n\n    npm install\n    \n**Build development version dist/excellentexport.js**\n\n    npm run build\n\n**Build publish version of dist/excellentexport.js**\n\n    npm run prod\n\n**Publish**\n\n    npm publish\n","readmeFilename":"README.md"}