つらつら Excel VBA

私の備忘録です。

2019-04-25から1日間の記事一覧

テキスト一括出力タブ区切り

Sub テキストファイルタブ区切り一括出力() Dim buf As String '1行 Dim delimiter As String '区切り文字 Dim row As Range, clm As Range Dim ws As Worksheet Dim outputTxt As String '全データ Dim outputFilePath As String '出力パス Dim fileNo As I…

テキスト出力タブ区切り(簡易)

Sub テキストファイル出力タブ区切り() Sheets(1).Copy '新しいブックが作成される Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\temp\test.txt", FileFormat:=xlText ActiveWorkbook.Close 'SaveChanges:=False Application.Dis…

テキストファイル読み込みタブ区切り

Sub テキストファイル読み込みタブ区切り() Dim filePath As String Dim buf As String, iRow As Integer Dim i As Integer Dim temp As Variant Dim fileNo As Integer filePath = Application.GetOpenFilename("CSVファイル(*.csv),*.csv,テキストファイル…