teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

3

分かりやすいようにコードの順番を入れ替え

2021/10/11 10:36

投稿

etherbeg
etherbeg

スコア1195

answer CHANGED
@@ -5,9 +5,9 @@
5
5
  ```python
6
6
  >>> import openpyxl
7
7
  >>> wb = openpyxl.load_workbook("name.xlsx")
8
- >>> ws = wb.worksheets[0]
9
8
  >>> wb.sheetnames
10
9
  ['名簿']
10
+ >>> ws = wb.worksheets[0]
11
11
  >>> ws_copy = wb.copy_worksheet(ws)
12
12
  >>> wb.sheetnames
13
13
  ['名簿', '名簿 Copy']

2

よく見たら必要なコードだったので元に戻した

2021/10/11 10:36

投稿

etherbeg
etherbeg

スコア1195

answer CHANGED
@@ -5,6 +5,7 @@
5
5
  ```python
6
6
  >>> import openpyxl
7
7
  >>> wb = openpyxl.load_workbook("name.xlsx")
8
+ >>> ws = wb.worksheets[0]
8
9
  >>> wb.sheetnames
9
10
  ['名簿']
10
11
  >>> ws_copy = wb.copy_worksheet(ws)

1

不要なコードが入っていたので削除

2021/10/11 10:35

投稿

etherbeg
etherbeg

スコア1195

answer CHANGED
@@ -5,7 +5,6 @@
5
5
  ```python
6
6
  >>> import openpyxl
7
7
  >>> wb = openpyxl.load_workbook("name.xlsx")
8
- >>> ws = wb.worksheets[0]
9
8
  >>> wb.sheetnames
10
9
  ['名簿']
11
10
  >>> ws_copy = wb.copy_worksheet(ws)