VBA
1Sub sample()
2
3 Dim fso 'As Scripting.FileSystemObject
4 Set fso = CreateObject("Scripting.FileSystemObject")
5 Dim ws As Worksheet, r As Long
6 Set ws = ActiveSheet
7 r = 1
8
9 Dim fn As String, wb As Workbook, rng As Range
10 Dim y, m, d
11 y = 2021
12 m = 4
13 For d = 1 To 31
14 fn = Format(DateSerial(y, m, d), "m月d日") & ".csv"
15 If fso.FileExists(fn) Then
16 Set wb = Workbooks.Open(fn)
17 Set rng = wb.Worksheets(1).UsedRange
18 If r > 1 Then Set rng = rng.Resize(rng.Rows.Count - 1).Offset(1)
19
20 ws.Range("A" & r).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
21 r = r + rng.Rows.Count
22 wb.Close False
23 End If
24 Next
25End Sub
26