rubyXL icon indicating copy to clipboard operation
rubyXL copied to clipboard

Pivot tables broken after saving

Open AArmada opened this issue 10 years ago • 6 comments

If you have a workbook / worksheet that has a pivot table in it, when you reopen a file that you saved using rubyXL Excel says it found unreadable content and asks to recover. After recovery Excel states that it removed the pivot table view: Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded. Removed Feature: PivotTable report from /xl/pivotTables/pivotTable1.xml part (PivotTable view)

Looking at the sheet, the data in the pivot table is there, but the table itself is not.

Steps to reproduce:

  1. Create a new working with a dummy data set(in Excell)
  2. Create a new pivot table from this data set (in Excell)
  3. Saving the file (in Excell)
  4. Opening and parsing the file (parsedFile = RubyXL::Parser.parse())
  5. Saving the file (parsedFile.write())

Attempting to open the file in Excel again gives the unreadable data error. Ruby 1.9.3 Excell 2010

AArmada avatar May 14 '15 19:05 AArmada

Can you please provide a sample file?

weshatheleopard avatar May 14 '15 19:05 weshatheleopard

http://www.filedropper.com/testexcellfile The Excel file i was using

require 'rubyXL'

parsedFile = RubyXL::Parser.parse("TestExcellFile.xlsx")
parsedFile.write("TestExcellFile2.xlsx")

This is what i was testing it with.

AArmada avatar May 14 '15 19:05 AArmada

Thank you, I will take a look.

weshatheleopard avatar May 14 '15 19:05 weshatheleopard

Hi, I came across this same issue too, are there any updates about it? a possible workaround? Thanks.

caedogap avatar Aug 20 '15 14:08 caedogap

The change required is rather massive. I don't have time to take care of that right now.

weshatheleopard avatar Aug 26 '15 00:08 weshatheleopard

+1 this will be critical to have as most use cases require data to be added, which will be used in pivot tables.

ausangshukla avatar Mar 11 '23 15:03 ausangshukla