|
特に言い方法は、有りませんが?
地道にやる他、無い様な気がします?
Sub TextOutput2()
Dim i As Long
Dim j As Long
Dim dfn As Integer
Dim vntData As Variant
Dim strBuff As String
dfn = FreeFile
Open ThisWorkbook.Path & "\" & "text.csv" For Output As #dfn
With Worksheets("Sheet1")
For i = 2 To 11
vntData = .Cells(i, 1).Resize(, 10).Value
strBuff = vntData(1, 1)
For j = 2 To UBound(vntData, 2)
Select Case j
Case 4
vntData(1, j) = Format(vntData(1, j), "yyyymmdd")
Case 5
vntData(1, j) = Left(vntData(1, j), 100)
Case 6
vntData(1, j) = "ABC"
End Select
strBuff = strBuff & "," & vntData(1, j)
Next j
Print #dfn, strBuff
Next i
End With
Close #dfn
End Sub
|
|