質問編集履歴
5
タグの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
4
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
Dim CSV As New System.Collections.ArrayList()
|
34
34
|
|
35
|
-
Dim CSVData As New FileIO.TextFieldParser("C:CSV.csv", System.Text.Encoding.GetEncoding(932))
|
35
|
+
Dim CSVData As New FileIO.TextFieldParser("C: \CSV.csv", System.Text.Encoding.GetEncoding(932))
|
36
36
|
|
37
37
|
CSVData.TextFieldType = FileIO.FieldType.Delimited
|
38
38
|
|
3
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
Dim CSV As New System.Collections.ArrayList()
|
34
34
|
|
35
|
-
Dim CSVData As New FileIO.TextFieldParser("C:
|
35
|
+
Dim CSVData As New FileIO.TextFieldParser("C:CSV.csv", System.Text.Encoding.GetEncoding(932))
|
36
36
|
|
37
37
|
CSVData.TextFieldType = FileIO.FieldType.Delimited
|
38
38
|
|
2
CSVの入出力コードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,6 +26,36 @@
|
|
26
26
|
|
27
27
|
```
|
28
28
|
|
29
|
+
|
30
|
+
|
31
|
+
```ここに言語を入力
|
32
|
+
|
33
|
+
Dim CSV As New System.Collections.ArrayList()
|
34
|
+
|
35
|
+
Dim CSVData As New FileIO.TextFieldParser("C: \提出用帳票\CSVデータ\月次報告書CSV.csv", System.Text.Encoding.GetEncoding(932))
|
36
|
+
|
37
|
+
CSVData.TextFieldType = FileIO.FieldType.Delimited
|
38
|
+
|
39
|
+
CSVData.Delimiters = New String() {","}
|
40
|
+
|
41
|
+
CSVData.HasFieldsEnclosedInQuotes = True
|
42
|
+
|
43
|
+
CSVData.TrimWhiteSpace = True
|
44
|
+
|
45
|
+
While Not CSVData.EndOfData
|
46
|
+
|
47
|
+
Dim fields As String() = CSVData.ReadFields()
|
48
|
+
|
49
|
+
CSV.Add(fields)
|
50
|
+
|
51
|
+
End While
|
52
|
+
|
53
|
+
sheet.Range("A1").Value = CSV
|
54
|
+
|
55
|
+
CSVData.Close()
|
56
|
+
|
57
|
+
```
|
58
|
+
|
29
59
|
A1からA11の範囲を通貨型で表しています。
|
30
60
|
|
31
61
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
1
初心者です。
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|