weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.27k stars 253 forks source link

Storage class not found for docProps/app.xml and xl/workbook.xml leading to error opening file #443

Open rcuhljr opened 1 year ago

rcuhljr commented 1 year ago

I receive two warnings during attempts to parse the file, and then the process fails with

*** WARNING: storage class not found for docProps/app.xml (http://purl.oclc.org/ooxml/officeDocument/relationships/extendedProperties)
*** WARNING: storage class not found for xl/workbook.xml (http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument)
WARNING: RubyXL::WorkbookRoot is not aware how to process RubyXL::GenericStorageObject
WARNING: RubyXL::WorkbookRoot is not aware how to process RubyXL::GenericStorageObject
NoMethodError: undefined method `root=' for nil:NilClass
from [snip].asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rubyXL-3.4.22/lib/rubyXL/objects/root.rb:69:in `parse_zip_file'

The file was an .xls file from the CMS.gov website, https://www.cms.gov/medicare/medicare-part-b-drug-average-sales-price/2023-asp-drug-pricing-files the July 2023 ASP Pricing File which was opened in excel and saved as an xlsx file with no changes.

Here is the copy I tested with to reproduce the issue our users are seeing. CopyJuly_2023_ASP_Pricing_File_060223.xlsx