zdavatz/spreadsheet

Formula is missing randomly.

safiir opened this issue · 9 comments

Desc

I try to open a excel file, then fill it with some dynamic data, but after the cell is filled and the excel is written to disk, some formula type cell's formula could be missing randomly.

Environment:

Ruby: ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Spreadsheet (1.1.5)

Code And File

script for test
.xls file for test

Interesting. Please provide sample code and file.

@zdavatz The test code and the file have been added. please check it, thanks!

Thanks. But we do not support XLSX. I will need an XLS File to test. Also: what software created the original XLS file?

@zdavatz Sorry, I updated the code and the file again, and I created the .xls file in WPS(like Microsoft Excel) for Debian-like Linux.

Try creating the file using LibreOffice or OpenOffice, then it should work. I have no idea what WPS is. They probably do not attend to all the format Rules of MS Excel. It makes a big difference to which software created the original file.

The output file "filled.xls" is not missing any data AFAICT.
filled

@zdavatz The formula in power column is missing instead of current and previous data.

I guess you have to write that as well when writing the new file.

Have you tried to write just the formulas from one file to another?