回答編集履歴
2
追記
test
CHANGED
@@ -19,3 +19,31 @@
|
|
19
19
|
$textBox.TextFrame2.TextRange.Text = "新しいテキスト"
|
20
20
|
|
21
21
|
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# 追記
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
ActiveX の方です。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
```PowerShell
|
34
|
+
|
35
|
+
$path = ファイルのフルパス
|
36
|
+
|
37
|
+
$excel = New-Object -ComObject Excel.Application
|
38
|
+
|
39
|
+
$excel.Visible = $true
|
40
|
+
|
41
|
+
$book = $excel.Workbooks.Open($path)
|
42
|
+
|
43
|
+
$sheet = $book.ActiveSheet
|
44
|
+
|
45
|
+
$textBox = $sheet.Shapes.Item("TextBox1")
|
46
|
+
|
47
|
+
$textBox.OLEFormat.Object.Object.Text = "新しいテキスト"
|
48
|
+
|
49
|
+
```
|
1
修正
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
$path = ファイルのフルパス
|
8
8
|
|
9
|
-
$excel =
|
9
|
+
$excel = New-Object -ComObject Excel.Application
|
10
10
|
|
11
11
|
$excel.Visible = $true
|
12
12
|
|