Deleting all sheets except first one

Posted by: ashis on 8 September 2017, 1:17 pm EST

  • Posted 8 September 2017, 1:17 pm EST

    Hi Bob


    Is there any way to delete all the sheets of a spread without loop(one by one) ata time except the sheet 0.


    for (int intSheetIndex = objFpSpread.Sheets.Count-1; intSheetIndex > 0 ; intSheetIndex--)


    {


    objFpSpread.Sheets.RemoveAt(intSheetIndex);


    }


    Thanks


    Ashis

  • Replied 8 September 2017, 1:17 pm EST

    Ashis -

    This is the only way to do it if you want to clear all the sheets but one.
Need extra support?

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

Learn More

Forum Channels