InsertRow changes other worksheets too lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- jollytall · 2022-04-19 08:45 wp, I came across the following problem: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var  WB : TsWorkbook;  WS, WS2 : TsWorksheet;beginWB := TsWorkbook.Create;WB.Options := [boReadFormulas, boCalcBeforeSaving, boAutoCalc];WS := WB.AddWorksheet('test');WS.WriteNumber(5, 0, 10);WS.WriteFormula(0, 0,'A6');writeln('before ',WS.ReadAsNumber(0, 0));WS2 := WB.AddWorksheet('test2');WS2.WriteNumber(5, 0, 10);WS2.WriteFormula(0, 0,'A6');WS2.InsertRow(2);writeln('after ',WS.ReadAsNumber(0, 0), ' ', WS2.ReadAsNumber(0, 0));WB.WriteToFile('test.ods', true);WB.Free;readln;end. When I insert a row in WS2 it changes the formulas in other Worksheets too. It can also be seen in the dump. Is it a bug, or I do something wrong? ---------------------------------------------------------------------- wp · 2022-04-21 16:59 The new version on CCR fixes this issue. I added a variety of test cases covering also the similar operations of inserting columns and inserting/deleting rows/columns. ---------------------------------------------------------------------- jollytall · 2022-04-22 06:08 Thanks, it works in my use case. I did not test all other cases, but guess those also work.