質問編集履歴

1

pythonコードの変更

2020/03/14 11:51

投稿

H.K2
H.K2

スコア88

test CHANGED
File without changes
test CHANGED
@@ -36,17 +36,25 @@
36
36
 
37
37
  ```python3
38
38
 
39
- def main():
39
+ from xlwings import Book
40
40
 
41
- print("Hello")
41
+ import xlwings as xw
42
42
 
43
43
 
44
44
 
45
- if __name__ == "__main__":
45
+ def test():
46
46
 
47
- main()
47
+ sh = xw.Book.caller().sheets['a']
48
+
49
+ sh.range('A1').value = 'hello'
48
50
 
49
51
 
52
+
53
+
54
+
55
+ if __name__ == '__main__':
56
+
57
+ test()
50
58
 
51
59
  ```
52
60