none
Change worksheet name RRS feed

  • Question

  • trying to change sheet[0] name using VSTO ...

    using Excel = Microsoft.Office.Interop.Excel;

    ((Excel.Worksheet)Globals.ThisAddIn.Application.Sheets[0]).Name = "MyName"

    maybe doing something wrong but this throw an exception DISP_E_BADINDEX (Sheet[0] exists). is this possible and if so how?

    can use foreach (Excel.Worksheet ws in WB.Sheets) ok

    Monday, July 22, 2013 4:56 PM

Answers