Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid value for Integer(): "" #574

Open
codescaptain opened this issue Sep 13, 2022 · 1 comment
Open

invalid value for Integer(): "" #574

codescaptain opened this issue Sep 13, 2022 · 1 comment

Comments

@codescaptain
Copy link

Thanks for filing an issue. Following these instructions will help us solve your problem sooner.

Steps to reproduce

Issue

I have an xlsx file and I want to check first sheet's first_row. But I get this error: invalid value for Integer(): "". If I edit the sheet name the error goes. I checked the solution: 478 and new version of roo gem.

The code is:

 def read_excel
    spread_sheet = Roo::Spreadsheet.open(file_path).sheet(0)
    if spread_sheet.first_row.blank? # throws the error (invalid value for Integer(): "")
      fail Errors::ExcelImport::EmptyFile
    end
    spread_sheet
  end

System configuration

Roo version:
2.7.1

Ruby version:
2.7.2

@patrickkulling
Copy link
Contributor

Hey @codescaptain can you share the exact spreadsheet that you are using or create an example sheet that is reproducing this exact issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants