1.0.3 • Published 4 years ago
excel-sheets v1.0.3
excel-sheets
What is?
Is a package with some function to manipulate xlsx files, you can parse your sheets into objects, filter by column and interval, get multiple information's in a row and filter unique information's in a array.
Functions
readSheet
const Sheet = readSheet(fileName);Input
- fileName: A
stringthat contains the directory of the xlsx file.Output
Sheet: An
objectwith the columns and rows of the Sheet.
getByColumnAndInterval
const Data = getByColumnAndInterval(Sheet, Column, Interval);Input
- Sheet: An
objectreturned byreadSheet - Column: A
stringof the column you want to filter on - Interval(Optional): An
arraylike[start, end]where start is the first row and end is the last row you want to filter on, by default get all rows.
Output
- Data: An
arraythat contains the information of each row of the column that you specified
getUniqueArray
const uniqueArray = getUniqueArray(Array);Input
- Array: an
arraywith repeated items
Output
- uniqueArray: the same
arraybut now without repeated items
getInfosInARow
const Infos = getInfosInARow(array, separator);Input
- Array: an
arrayof strings that contains multiple information's - Separator: the
stringseparation pattern;
Output
- Infos: An
arraylike[infos, times]where infos is the array of separate strings and times is an array containing the times that one index has been called on each iteration in a row