回答編集履歴
1
修正
test
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
```VBA
|
4
4
|
|
5
5
|
Function DQCSV(rng As Range) As String
|
6
|
+
|
7
|
+
Const DQ = """", COMMA = ","
|
6
8
|
|
7
9
|
Dim i
|
8
10
|
|
@@ -10,15 +12,17 @@
|
|
10
12
|
|
11
13
|
For i = 1 To rng.Rows.Count
|
12
14
|
|
13
|
-
arr(i) =
|
15
|
+
arr(i) = DQ & Join(WorksheetFunction.Index(rng.Value, i, 0), DQ & COMMA & DQ) & DQ
|
14
16
|
|
15
|
-
' arr(i) =
|
17
|
+
' arr(i) = DQ & WorksheetFunction.TextJoin(DQ & COMMA & DQ, False, rng.Rows(i)) & DQ
|
16
18
|
|
17
19
|
Next
|
18
20
|
|
19
21
|
DQCSV = Join(arr, vbLf)
|
20
22
|
|
21
23
|
End Function
|
24
|
+
|
25
|
+
|
22
26
|
|
23
27
|
|
24
28
|
|