回答編集履歴

1

コレクションの下限は1から

2023/04/15 07:51

投稿

KOZ6.0
KOZ6.0

スコア2721

test CHANGED
@@ -17,8 +17,8 @@
17
17
  static void Main()
18
18
  {
19
19
  using (Excel.Application xlApp = Excel.Application.GetActiveInstance()) {
20
- Excel.Workbook xlBook = xlApp.Workbooks[0];
20
+ Excel.Workbook xlBook = xlApp.Workbooks[1];
21
- Excel.Worksheet xlSheet = (Excel.Worksheet)xlBook.Worksheets[0];
21
+ Excel.Worksheet xlSheet = (Excel.Worksheet)xlBook.Worksheets[1];
22
22
  xlApp.Quit();
23
23
  }
24
24
  }