I'm currently writing a program to do simple Excel editing in C#.

So when I select a sheet in Excel, I want to select the sheet name in the combo box and edit the selected sheet, but I am not sure how to display the list of sheet names in Excel in the combo box and edit that sheet. I am.
Can anyone please tell me how to get the sheet name in Excel and how to get it and select it in a combo box?

I am using the Microsoft Excel Library.

  • Answer # 1

    It was a mistake to think about getting the sheet information and the sheet name separately.

    Since the sheet name was included in the sheet information, I just got the sheet information, converted the sheet name in it to a string type, and output it.

  • Answer # 2

    You can add the sheet name with items.add (sheet name) of the combo box.