Typed import, and export XLSX spreadsheet to JS / TS. Template-based create, render, and export data into excel files.
Thanks for each single contribution, you're fantanstic!
Proxy
to prevent modification of the original view model. by @Siemienik in https://github.com/Siemienik/XToolset/pull/236
Thank you!
Full Changelog: https://github.com/Siemienik/XToolset/compare/v2.4.4...v2.4.7
Full Changelog: https://github.com/Siemienik/XToolset/compare/xlsx-renderer-v2.4.3...v2.4.4
In this release, two similar proposals were done. Both use string interpolation to gain indeed result.
https://github.com/Siemienik/XToolSet/pull/158 (PR https://github.com/Siemienik/XToolSet/pull/160) for the request from @jasonclake.
#=
${pathToVariable}
.#= ${summaryFormula}(A2:A${item.__endOutput.r})
gives something like =MAX(A2:A2910)
https://github.com/Siemienik/XToolSet/pull/152 (PR https://github.com/Siemienik/XToolSet/pull/161) for the request from @jacekkoziol.
#`
${pathToVariable}
.#Hello ${name}! How are you?</code> gives for instance
Hello World! How are you?`
Kind regards, Paweł Siemienik [email protected]
You can catch me for a chat on Gitter.
Read more about mappers and how to use it.
booleanMapper
in #54 by @machadolucasvp - Thank you!
Map string into boolean
import {booleanMapper} from 'xlsx-import/lib/mappers';
booleanMapper('1'); // returns true
booleanMapper('0'); // returns false
numberMapper
in #55 by @machadolucasvp - Thank you!
Map string into float number
import {numberMapper} from 'xlsx-import/lib/mappers';
numberMapper('1.5'); // returns 1.5
numberMapper('0.05'); // returns 0.05
integerMapper
in #56 by @machadolucasvp - Thank you!
Map string into integer
import {integerMapper} from 'xlsx-import/lib/mappers';
integerMapper('1.5'); // returns 1
integerMapper('0.05'); // returns 0
integerMapper https://github.com/Siemienik/xlsx-import/pull/56 @machadolucasvp
The pull requests #66 and #67 introduced markdown linter and GH workflow to automatically performing lint fixing.
The v2.3.2
introduce many ready to use value mappers and additional samples.
🚀 All contributors many thanks (@Gontrum, @Metastasis, @Siemienik) 🎉 You've done a lot greatness job 🥇
isEmpty
in #41 by @Gontrum - Thank you!
Examine if input is empty
import {isEmpty} from 'xlsx-import/lib/mappers';
isEmpty('asd'); // returns false
isEmpty(''); // returns true
isFilled
in #42 by @Gontrum - Thank you!
Examine if input is not empty
import {isFilled} from 'xlsx-import/lib/mappers';
isFilled('asd'); // returns true
isFilled(''); // returns false
jsonMapper
in #43 by @Gontrum - Thank you!
Try to parse json string into js object, if failed return null
import {jsonMapper} from 'xlsx-import/lib/mappers';
jsonMapper(''); // returns null because invalid input
jsonMapper('asd'); // returns null because invalid input
jsonMapper('"asd"'); // returns "asd"
jsonMapper('false'); // returns false,
jsonMapper('123'); // returns 123,
jsonMapper('false'); // returns false,
jsonMapper( '{"a":[1]}'); // returns { a: [ 1 ] },
lowerCaseMapper
in #44 by @Metastasis - Thank you!
Changes string into lower case.
import {lowerCaseMapper} from 'xlsx-import/lib/mappers';
lowerCaseMapper('ASD'); // returns 'asd'
upperCaseMapper
in #36 by @Metastasis - Thank you!
Changes string into UPPER CASE.
import {upperCaseMapper} from 'xlsx-import/lib/mappers';
upperCaseMapper('asd'); // returns 'ASD'
splitMapper
in #50 by @Siemienik
Split string into array of items. May be customised by setting separator and item mapper: (Doing customisation do not change original mapper but create new one.)
import {splitMapper} from 'xlsx-import/lib/mappers';
splitMapper('asd,jkl'); // returns ['asd', 'jkl']
splitMapper.separator(' || ')('string,1 || string,2'); // returns ['string,1', 'string,2']
splitMapper.itemMapper(upperCaseMapper)('lower1,lover2'); // returns ['LOWER1', 'LOVER2']
This version introduce two additional samples: All off these mappers are well tested, for lots examples how it works please study unit tests
in #45 by @Metastasis - Thank you!
Show how to use xlsx-import
in an application built on Nodejs with Typescript. For more details follow this link.
in #47 by @Metastasis - Thank you!
Microservice written in ExpressJS . For more details follow this link.
This was really existing time that get results in many PR merged 🚀
Some functions and default exports was refactored, it means that the previous version is deprecated now. It still works same way like previous, however it will be removed on January 2021. Please follow by deprecated notes or use Migration Guide
ImportType
GetAllItems
to getAllItems
. Run test to prove that it doesn't fail your up.From
to from
, run test again.from: const ImporterFactory = require('xlsx-import/lib/ImporterFactory').default;
to: const {ImporterFactory} = require('xlsx-import/lib/ImporterFactory');
from: import ImporterFactory from 'xlsx-import/lib/ImporterFactory';
to: import {ImporterFactory} from 'xlsx-import/lib/ImporterFactory';
Migration is required to proceed before January 2021, when deprecated items will be removed.
Upgrade version and resolving deprecations was done also in our sample, this PR #33 might be helpful for you.
Do you want to support my work? ❤️ Sponsor me Your issue is stuck? I can make it done, contact me for further info :)
ExcelJS introduce version 4 more than half year ago, so it is great time to upgrade xlsx-import
.
Lib may stop working with node version < 10 . If problem occurs please create an issue it will be fixed soon.
Also some improvements in Readme was done.
npm notice 📦 [email protected]
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 118B lib/config/IColumnConfig.js
npm notice 117B lib/config/IFieldConfig.js
npm notice 114B lib/IImporter.js
npm notice 122B lib/config/IListSourceConfig.js
npm notice 1.5kB lib/Importer.js
npm notice 3.6kB lib/ImporterFactory.js
npm notice 124B lib/config/IObjectSourceConfig.js
npm notice 118B lib/config/ISourceConfig.js
npm notice 1.6kB package.json
npm notice 128B lib/config/IColumnConfig.js.map
npm notice 126B lib/config/IFieldConfig.js.map
npm notice 110B lib/IImporter.js.map
npm notice 136B lib/config/IListSourceConfig.js.map
npm notice 1.4kB lib/Importer.js.map
npm notice 441B lib/ImporterFactory.js.map
npm notice 140B lib/config/IObjectSourceConfig.js.map
npm notice 128B lib/config/ISourceConfig.js.map
npm notice 2.6kB README.md
npm notice 113B lib/config/IColumnConfig.d.ts
npm notice 136B lib/config/IFieldConfig.d.ts
npm notice 139B lib/IImporter.d.ts
npm notice 212B lib/config/IListSourceConfig.d.ts
npm notice 272B lib/Importer.d.ts
npm notice 122B lib/ImporterFactory.d.ts
npm notice 187B lib/config/IObjectSourceConfig.d.ts
npm notice 85B lib/config/ISourceConfig.d.ts
npm notice === Tarball Details ===
npm notice name: xlsx-import
npm notice version: 2.3.0
npm notice package size: 5.7 kB
npm notice unpacked size: 14.9 kB
npm notice shasum: 6f0a5de39bc72d6a1b588992bda7ff758ff2b536
npm notice integrity: sha512-LpkE2gCkfKM7R[...]wUpIaLD404qpQ==
npm notice total files: 27
npm notice
+ [email protected]
➜ xlsx-import git:(master)