Which data types are fastest for generating a structure output to excel file? lazarus / 21-General ---------------------------------------------------------------------- noszone · 2021-06-25 10:47 Can someone advise which data types are better for the subject? For example I want to create a complex excel file with 2000+ rows of data like employees info, dates, mixed data, etc. First my idea is to use a record type, arrays. What can be else? Thanks. ---------------------------------------------------------------------- wp · 2021-06-25 10:57 There are two ways to create Excel files: #1: Use OLE (on Windows only). My impression fairly slow. https://wiki.lazarus.freepascal.org/ExcelAutomation/de (German only) #2: Use the fpspreadsheet: https://wiki.lazarus.freepascal.org/FPSpreadsheet, cross-platform, does not support all features of Excel. ---------------------------------------------------------------------- noszone · 2021-06-25 11:06 Thanks, I am aware of them. My question is more about data structure(speed) from Lazarus side. For example in JS mostly used example: Code: Javascript  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const multiDataSet = [  {    columns: [      { value: "Name", widthPx: 50 }, // width in pixels      { value: "Salary", widthCh: 20 }, // width in charachters      { value: "Sex", widthPx: 60, widthCh: 20 }, // will check for width in pixels first    ],    data: [      ["Johnson", 30000, "Male"],      ["Monika", 355000, "Female"],      ["Konstantina", 20000, "Female"],      ["John", 250000, "Male"],      ["Josef", 450500, "Male"],    ],  },  {    xSteps: 1, // Will start putting cell with 1 empty cell on left most    ySteps: 5, //will put space of 5 rows,    columns: ["Name", "Department"],    data: [      ["Johnson", "Finance"],      ["Monika", "IT"],      ["Konstantina", "IT Billing"],      ["John", "HR"],      ["Josef", "Testing"],    ],  },]; Would be effective such structures in Lazarus? ---------------------------------------------------------------------- Mongkey · 2021-06-25 14:37 May be considering move it to sqlite or other equivalent db and process it inside laz, export result into an excel file would help you processong speed. ---------------------------------------------------------------------- wp · 2021-06-25 16:14 Dedicated "hard-coded" records (type TPerson = record Name: String; Salary: Integer; Sex: Byte)) will always be faster than parsing a dynamic structure such as json, xml etc. But I doubt that you'll notice the difference (2000 records is "nothing"). And do not forget the time to create the Excel structure. Using OLE will certainly be the speed-limiting step.