Posted 5 December 2023, 9:32 am EST
We are currently upgrading an old spread to the current version.
With the old version our customers were able to create their own sheets, store them in a database and edit them later.
For smaller and mid-sized sheets (around A4/letter) this still works fine after the update, but larger sheets now lose their formulas.
byte[] sheetdata = Load_Old_Sheet_From_Database();
FarPoint.Win.Spread.SheetView view = new FarPoint.Win.Spread.SheetView();
using (System.IO.MemoryStream ms = new System.IO.MemoryStream(sheet))
{
view.Open(ms);
}
Right with the Open() all formulas are gone.
view.Cells[x,y].Formula is empty for each cell and view.Cells[x,y].Text contains the last calculated text.
I am not sure at what exact conditions the formulas are getting removed.
It is probably not only the size of the sheet. If I add new formulars to one of the large corrupted sheets, then these will be stored again.
So I think it might be a high number of formulas, that trigger this behavior.
Is there any way to prevent this?
Right now, this obliterates most of the sheets, the next time they are opened.