|
- Sub Test1(Optional StartTime As Date = "2024/01/01 11:59:59", Optional EndTime As Date = "2024/01/01 12:00:00")
- Application.EnableEvents = False
- Application.ScreenUpdating = False
- OnTime
- Application.CutCopyMode = False
- With ActiveSheet.QueryTables.Add(Connection:="URL;https://club.excelhome.net" _
- , Destination:=Range("$A$1"))
- .Name = "club.excelhome"
- .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
- Application.Wait Now + TimeValue("0:00:01")
- Application.PrintPreview
- Application.PrintOut Preview:=False, Copies:=1, PreviewType:=xlPreviewPrint, PrintToFile:=False, From:=1, To:=1, IncludeDocProperties:=False, IgnorePrintAreas:=False, UseISO12208:=False, OpenAfterPublish:=False
- Application.EnableEvents = True
- Application.ScreenUpdating = True
- Application.CutCopyMode = xlOff
- End Sub
复制代码 |
|