I open the file and save. All formulas are lost lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- veb86 · 2024-05-17 12:52 Hello. I'm back. I tried to work with OLE but it is very slow. I have a large number of calculations that I want to do in Excel. I am ready to add the formulas I need that are not in the library, but under your control. Now I decided to try this library again, how many formulas will be lost. As a result, I lose absolutely everything. I think I'm making some mistake. Please help me. Revision:9261 my code: 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 MyWorkbook := TsWorkbook.Create;  MyWorkbook.ReadFromFile('d:\4.xlsx', sfOOXML); MyWorkbook.Options := MyWorkbook.Options + [boAutoCalc];MyWorkbook.WriteToFile('d:\444.xlsx', sfOOXML,true); ---------------------------------------------------------------------- wp · 2024-05-17 14:22 By default, fpspreadsheet does not read formulas. You must activate this by adding [boReadFormulas] to the Workbook.Options. And do the BEFORE reading. https://wiki.lazarus.freepascal.org/FPSpreadsheet#Formulas ---------------------------------------------------------------------- veb86 · 2024-05-17 14:39 Thank you. It worked. Now we will need to add new formulas. For now it is very necessary: INDEX MATCH ROUNDUP I think it's worth starting with ROUNDUP))) Please tell me where to read about adding new formulas. ---------------------------------------------------------------------- wp · 2024-05-17 15:00 Read the wiki article a bit further down: https://wiki.lazarus.freepas cal.org/FPSpreadsheet#Extending_FPSpreadsheet_by_user-defined_formulas