You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to parse a xlsm file containing an instance of metadata part I receive the following message:
*** WARNING: storage class not found for metadata.xml (http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata)
WARNING: RubyXL::Workbook is not aware how to process RubyXL::GenericStorageObject
It's not possible to open the exported file in Excel.
I also tried the parse method using the file path, it results in the same warning message and the exported file is also not readable in Excel.
Am I doing something wrong, or is there any workaround I can apply to parse xlsm files with metadata part?
Unfortunately I can't provide the file as it contains sensitive data from a third party.
module RubyXL
class SheetMetadata < GenericStorageObject
CONTENT_TYPE = 'application/vnd.ms-excel.sheetMetadata'
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata'
end
class Workbook
define_relationship(RubyXL::SheetMetadata)
end
end
require 'rubyXL'
module RubyXL
class SheetMetadata < GenericStorageObject
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml'
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata'
end
class Workbook
define_relationship(RubyXL::SheetMetadata)
end
end
def foo(src, dest)
workbook = RubyXL::Parser.parse(src)
workbook.write(dest)
end
foo(ARGV.shift, ARGV.shift)
require 'rubyXL'
module RubyXL
class SheetMetadata < GenericStorageObject
CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml'
REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata'
end
class Workbook
define_relationship(RubyXL::SheetMetadata)
end
end
def foo(src, dest)
workbook = RubyXL::Parser.parse(src)
workbook.write(dest)
end
foo(ARGV.shift, ARGV.shift)
Try to parse another xlsx file, i have the same problem today and this resolve the issue
Activity
seki commentedon Mar 18, 2021
Monkey patched.
weshatheleopard commentedon Mar 18, 2021
@seki Can you please attach a sample file with which you are experiencing this issue?
seki commentedon Mar 19, 2021
Sorry, I can't show the sample file.
mewthu2 commentedon Apr 18, 2022
Try to parse another xlsx file, i have the same problem today and this resolve the issue
HLFH commentedon Oct 17, 2023
Here is my monkeypatch for - I suppose - a Google Sheets document that has been exported as an Excel file:
weshatheleopard commentedon Oct 17, 2023
Can somebody give me a sample file that exhibits this behavior already?
khiav223577 commentedon Oct 29, 2023
Try this file: test.xlsx