Spreadsheet performance

I have tried simplifying the workflow with macros for both Desktop Editors and LibreOffice. Here are the scripts:

  • Desktop Editors (in JS):
(function()
{
    let doc = Api.GetActiveSheet();
    for (let i = 0; i < 10000; i++) {
        doc.GetRangeByNumber(i, 0).SetValue(i)
    }
    for (let i = 0; i < 10000; i++) {
        doc.GetRangeByNumber(i, 2).SetValue('=SUMIF(A1:A10000,">5000")')
    }
})();
  • LibreOffice (in compatible VBA):
Sub Sample()

    Dim oDoc As Object
    Dim oSheet As Object
    Dim cellArr As Long
    Dim oCell As Object

    oDoc = ThisComponent
    oSheet = oDoc.Sheets.getByName("Sheet1")

    For cellArr = 0 To 10000
        oCell = oSheet.getCellByPosition(0, cellArr)
        oCell.Value = cellArr
    Next cellArr

    For cellArr = 0 To 10000
        oCell = oSheet.getCellByPosition(2, cellArr)
        oCell.Formula = "=SUMIF(A1:A10000;"">5000"")"
    Next cellArr

End Sub

The results in completion are quite similar. Also, manually entering iterative values in the column A and setting up a formula in the column C did not produce any significant difference in my case.

I believe it’d be useful. You can upload a video to any cloud storage and share a link to it for review. As soon as you get next trust level, you will be available to attach videos and files to your reply. For more information please refer to my post here: Community rules - #14 by Constantine