- Excelで作業したいブックを開く
- Alt + F11
- 左のペイン「プロジェクト - VBAProject」で「ThisWorkbook」をダブルクリック
- ☝を貼る
- ツールバーから「実行」
Last active
May 3, 2020 14:33
-
-
Save kissge/72d58833918cba80a37fdf0f82fc303c to your computer and use it in GitHub Desktop.
Excelの全シートをそれぞれCSVエクスポートする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub saveSheetsAsCSV() | |
Dim i As Integer | |
Dim fName As String | |
Application.DisplayAlerts = False | |
For i = 1 To Worksheets.Count | |
fName = "C:\Users\yk\Downloads\sheet-" & i & ".csv" | |
ActiveWorkbook.Worksheets(i).SaveAs Filename:=fName, FileFormat:=xlCSVUTF8 | |
Next i | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment