Closed ravindra8chouhan closed 4 years ago
Empty columns are always skipped by design. You can fork if you want. The line: https://github.com/catamphetamine/read-excel-file/blob/e6e383a8c222f1c1fb60900d6405de8524ccca84/source/readXlsx.js#L115
Sorry for re-open this one but I kind of need this feature. What about passing a flag, something like:
readXlsxFile(path, {getSheets: true, skipEmptyLines: false});
I can create a patch but would you rather merge the patch?
@RoySegall Your issue seems like a completely different one: you're saying about not skipping empty lines. This library isn't likely to support something like that, your case seems to be the minority.
The thing is that I need to know the number of line of the row in the file and when I have empty lines I can't get that number correctly. Any ideas?
The thing is that I need to know the number of line of the row in the file
Why?
I'm processing a file that contains a list of holdings such as: physical assets, coins types (euro, dollar), stock IDs, and more. The problem is that the data in the file does not have a standard (one line can be USD, u.s.d) and we need to eventually provide a report that tells where is the faulty record.
In order to that, I need to know the line number of which the cell value came from. Because empty lines are ignored I need a way to track it.
and we need to eventually provide a report that tells where is the faulty record.
For error reporting, there's validate()
function of a column, and the errors
result property.
The problem is that the excel file doesn't have a structured format and a schema won't be applied here. It's kind of complicated to explain and I'm pretty sure that you don't know Hebrew so I won't upload the file.
Any way - is there a way to pass a flag that won't skip empty lines (I'll make a PR for that) or maybe pass a flag that will bring the line number with a flag.
It's kind of complicated to explain and I'm pretty sure that you don't know Hebrew so I won't upload the file.
So, yeah, your case is a very specific one and doesn't deserve a feature in a library.
Any way - is there a way to pass a flag that won't skip empty lines (I'll make a PR for that) or maybe pass a flag that will bring the line number with a flag.
You can just fork and patch the code.
Published read-excel-file@5.0.0
that doesn't skip empty rows or columns in the beginning and in the middle (only discards empty rows and columns at the end).
When we import excel sheet with blank coloum, like a, b ,d column having data, but in c we define blank column then read-excel-file module never read that c column. How can we fixed this. Please resolve and let me know.