Thanks for filing an issue. Following these instructions will help us solve your problem sooner.
Steps to reproduce
Create an excel file that has empty rows between filled rows.
Read the data with each_row_streaming function
Issue
I need to show an error for the filled line which comes after the blank line. The error should specify the row number like this -> "The value on row #[row-number] is invalid."
Since the library access Nokogiri::XML::Reader with Nokogiri::XML::ParseOptions::NOBLANKS parameter on each_element utility, empty lines are skipped. Which causes indices to be wrong. Problematic line: https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/utils.rb#L106
Also, the original row number is stored in "r" attribute for each row on the XML file. But since you only return the root data of the row there is no way to access this attribute either.
Possible solutions;
Accept another parameter for each_row_streaming which will specify ParseOptions for Nokogiri instead of fixed NOBLANKS.
Allow each_row_streaming to return the full row data instead of root only.
Thanks for filing an issue. Following these instructions will help us solve your problem sooner.
Steps to reproduce
Issue
I need to show an error for the filled line which comes after the blank line. The error should specify the row number like this -> "The value on row #[row-number] is invalid." Since the library access Nokogiri::XML::Reader with Nokogiri::XML::ParseOptions::NOBLANKS parameter on each_element utility, empty lines are skipped. Which causes indices to be wrong. Problematic line: https://github.com/roo-rb/roo/blob/4ec1104f0c3c2a29711c0c907371cd2be12bcc3c/lib/roo/utils.rb#L106
Also, the original row number is stored in "r" attribute for each row on the XML file. But since you only return the root data of the row there is no way to access this attribute either.
Possible solutions;
System configuration
Roo version: 2.8.2 Ruby version: 2.6.5