Open rodrigomageste opened 1 year ago
My Gemfile.lock:
simple_xlsx_reader (5.0.0)
nokogiri
rubyzip
rubyzip (1.0.0)
nokogiri (1.13.9)
I have same issue, i think this solution looks good!
This causes the tests to break and also causes breakages with real-world testing.
I hope this message finds you well. Firstly, I'd like to express my gratitude for the efforts put into maintaining the SimpleXlsxReader gem – it's been a valuable tool for many.
I've come across an issue while utilizing the gem that I believe needs your attention. The problem arises when I attempt to run the following code snippet:
This line of code triggers an error message:
RuntimeError: Zip::ZipFile.open_buffer expects an argument of class String or IO. Found: File
. After investigating the source of the issue, it seems that the root cause lies within theloader.rb
file, precisely at this line.My solution to this problem was to modify the line
SimpleXlsxReader::Zip.open_buffer(string_or_io)
toSimpleXlsxReader::Zip.open(string_or_io)
. This change effectively resolves the issue and allows the code to run smoothly.I believe this small tweak could prevent similar errors for other users as well. I wanted to bring this to your attention so that it can be reviewed and addressed appropriately.