VMware ESX vCenter Linux windows CCNA 忍者ブログ

IT号 着地号 いろいろ号

 ITに関しての調べ物です。バージョンや出展はつど記事に記載予定です。

カレンダー
11 2025/12 01
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
リンク
カテゴリー
かぶりもの
最新CM
[06/07 gay]
[02/16 gay]
[02/12 ヴィトン セカンドバッグ スーパーコピー ヴィトン]
[09/30 vente boutique canada goose paris]
[09/28 canada goose belgique]
最新記事
プロフィール
HN:
ESXi
性別:
非公開
バーコード
RSS
ブログ内検索
アーカイブ
最古記事
(01/14)
(01/20)
(01/20)
(01/26)
(01/26)
忍者アナライズ

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

2025.12.14 (Sun)
Category[]

ファイル取り込み処理の一部

Sub Main

'----------------------
'ファイル取り込み処理

For j = sID1 To endID1
filename = ThisWorkbook.Path & "\Disk_C_" & nengetu & Format(j, "00") & ".csv"
sheetsName = hostName & "_Disk_" & Format(j, "00")

'ファイルがない場合にループを抜ける処理
If Dir(filename) = "" Then
MsgBox j & "日のファイルが見つかりません"
GoTo Line1
End If

'外部テーブル範囲に取り込み
'---------------------------------
Set myQT = Sheets(sheetsName).QueryTables.Add( _
Connection:="TEXT;" & fileName, _
Destination:=Sheets(sheetsName).Range("A1"))
With myQT
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileTabDelimiter = False
.TextFileOtherDelimiter = ""
.AdjustColumnWidth = True
.BackgroundQuery = False
.Refresh
.Delete
End With

'---------------------------------
'ここに、取り込んだファイルの処理内容を書く
'---------------------------------

Next j

'---------------------------------
MsgBox hostName & "マクロ正常終了"
Line1:


End Sub

拍手[0回]

PR
2018.05.24 (Thu)
Category[VBA]
Comment(0)

コメント

この記事にコメントする
Name:
Mail:
URL:
Title:
Comment:
Password:
  Vodafone絵文字 i-mode絵文字 Ezweb絵文字

Copyright © ESXi All Right Reserved.
Powered by Ninja Blog.
Template-Designed by ガスボンベ.