https://github.com/testxio/testx-xlsx-parser
https://github.com/testxio/testx-xlsx-parser
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/testxio/testx-xlsx-parser
- Owner: testxio
- Created: 2015-09-16T11:01:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-26T09:53:41.000Z (over 9 years ago)
- Last Synced: 2025-10-26T08:14:19.325Z (7 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
testx-xlsx-parser
=====
Simple XLSX file parser for use with the testx library. Converts a test script in a XLSX sheet to testx test script (JSON).
## API
This library exposes only one method **parse** that takes 3 arguments *fileName*, *sheetName* and *formatLocale* and returns a promise that resolves to the JSON representation of the test script on that sheet. Example:
```
xlsx = require('testx-xlsx-parser')
xlsx.parse('xls-files/test.xlsx', 'Sheet1', 'NL')
```
The format locale can be a two letter string or an array of regex replacements that are applied to the format string of each cell, for example:
```
xlsx.parse('xls-files/test.xlsx', 'Sheet1', [{from: /JJ/g, to: 'YY'}, {from: /jj/g, to: 'yy'}])
```