回答編集履歴
1
修正
test
CHANGED
@@ -1,12 +1,6 @@
|
|
1
|
+
こんな感じでどうでしょうか。
|
2
|
+
|
1
3
|
```VBS
|
2
|
-
|
3
|
-
Dim r, p
|
4
|
-
|
5
|
-
r = rental_Prace
|
6
|
-
|
7
|
-
p = plan_Name
|
8
|
-
|
9
|
-
|
10
4
|
|
11
5
|
'出力ファイルの文字コードを指定
|
12
6
|
|
@@ -20,13 +14,21 @@
|
|
20
14
|
|
21
15
|
|
22
16
|
|
17
|
+
Dim lineNo
|
18
|
+
|
19
|
+
lineNo = 0
|
20
|
+
|
21
|
+
|
22
|
+
|
23
23
|
Do Until inputcsv.EOS
|
24
24
|
|
25
25
|
'1行ずつ読み取り、strLineに格納
|
26
26
|
|
27
|
+
lineNo = lineNo + 1
|
28
|
+
|
27
29
|
strLine = inputcsv.ReadText(-2)
|
28
30
|
|
29
|
-
|
31
|
+
'WScript.Echo strLine
|
30
32
|
|
31
33
|
strLineSplited = Split(strLine, ",")
|
32
34
|
|
@@ -38,17 +40,21 @@
|
|
38
40
|
|
39
41
|
|
40
42
|
|
41
|
-
For i = 0 To 1
|
43
|
+
For i = 0 To add1 - 1
|
42
44
|
|
43
45
|
arr(i) = strLineSplitted(i)
|
44
46
|
|
45
47
|
Next
|
46
48
|
|
47
|
-
|
49
|
+
If lineNo = 1 Then
|
48
50
|
|
49
|
-
arr(1
|
51
|
+
arr(add1) = rental_Prace
|
50
52
|
|
53
|
+
arr(add2) = plan_Name
|
54
|
+
|
55
|
+
End If
|
56
|
+
|
51
|
-
For i = 1
|
57
|
+
For i = add2 + 1 To UBound(arr)
|
52
58
|
|
53
59
|
arr(i) = strLineSplitted(i - 2)
|
54
60
|
|
@@ -59,14 +65,6 @@
|
|
59
65
|
Data = Join(arr, ",")
|
60
66
|
|
61
67
|
outputcsv.WriteText Data, 1
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
r = ""
|
66
|
-
|
67
|
-
p = ""
|
68
|
-
|
69
|
-
|
70
68
|
|
71
69
|
Loop
|
72
70
|
|