RemoveRows with formula too slowwwwwwww

Posted by: zxc37247151 on 10 September 2017, 10:59 am EST

    • Post Options:
    • Link

    Posted 10 September 2017, 10:59 am EST

    RemoveRows with formula too slowwwwwwww

    Code:

    ShowSource = new ObservableCollection();

    int row = 1500;

    for (int i = 0; i < row; i++)

    {

    ShowSource.Add(new Source { A = i.ToString(), B = i.ToString(), C = i.ToString(), D = “d” + i,E=“E”+i,F=“f”+i,G =“g”+ i, H =“h”+ i, I =“i”+ i, K = “k”+i, J =“j”+ i, L =“l”+ i });

    }

    ssTest.Sheets[0].DataSource = ShowSource;

            ssTest.Sheets[0].Cells["A1:A"+ row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["B1:B" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["C1:C" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["D1:D" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["E1:E" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["F1:F" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["G1:G" + row + ""].Formula = "(A1+B1)+1";
            ssTest.Sheets[0].Cells["H1:H" + row + ""].Formula = "(A1+B1)+1";
    

    When you try to remove one row like:

    ssTest.Sheets[0].RemoveRows(0,1,SheetArea.Cells);

    Almost need 10 second…

    How to improve the performance

  • Posted 12 December 2017, 7:59 am EST

    Hello,

    Please test the issue with the newly released Spread .NET v11.0 and let me know if the issue still exists.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels