0
我用宏從htm文件導入數據。到目前爲止,查詢表也工作得很好。然後我把整個文件移動到一個在線文件夾,它不再工作。宏停在最後一行backgroundquery。我認爲它與文件移動到聯機文件夾有關,速度可能不足以導入數據。但我沒有足夠的經驗去理解那裏寫的是什麼。我只是記錄了這個宏。你知道它爲什麼停止工作嗎?查詢表Excel調試導入
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;file:///C:/.../.../..." & Datei & ".htm", Destination:= _
Range("$A$1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With