Home>

Csv is output to Excel with macro.

Numbers arranged in the ABC column of csv are displayed from the first row to the 31st row of the ABC column of Excel, which shortens the time.
In the future, I would like to enter something different from the 1st line to the 30th line.
Is it possible to output the data read by csv from the 35th row of the B column?

Sub Sample ()
    Dim buf As String, tmp As Variant, n As Long
    Open "C: \ Users \ ****** \ test.csv" For Input As # 1
        Do Until EOF (1)
            Line Input # 1, buf
            tmp = Split (buf, ",")
            n = n + 1
            Cells (n, 1) .Value = tmp (0)
            Cells (n, 2) .Value = tmp (1)
            Cells (n, 3) .Value = tmp (2)
        Loop
    Close # 1
End Sub

Try it,
n = ws.Cells (26, 1) .End (xlDown) .Row
I tried to specify the start line, but it didn't work.

Thank you for teaching us.