Skip to content

Unable to open Modified xlsx file in windows excel #370

Open
@vinodprak

Description

@vinodprak

Hi

Am trying to change content of cell in few worksheets using 'rubyXL', '~> 3.3.33'. After Modifying and saving am unable to open the sheet in windows excel.

workbook = RubyXL::Parser.parse("test.xlsx")
worksheet = workbook.worksheets[0]
worksheet[1][1].change_contents("dummy_content")
workbook.write("output.xlsx")

Opening the modified file in excel gives me an error We found a problem with some content test.xlsx. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.

After clicking yes, file is opened with another error.

Removed Part : /xl/comments1.xml part with xml error (Comments) Load error. Line 10, column 147
Repaired Part : /xl/workbook.xml part with xml error (Workbook) Load error. Line 3, column 0

Is there something am doing wrong ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions