Sub import_HM()
ocistiti
    With ActiveSheet.QueryTables.Add(Connection:="TEXT;D:\Poker\HM\Report.csv", _
        Destination:=Range("$E$1"))
        .Name = "Report_3"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 65001
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = True
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
    Columns("E:AA").Select
    Columns("E:AA").EntireColumn.AutoFit
    Range("E1").Select
End Sub

Sub HM_GO()
Range("E1:Q1").Select
    Selection.Delete Shift:=xlUp
    Columns("p:p").Select
    Selection.Delete Shift:=xlToLeft
   Dim iLastRow As Long
   iLastRow = Cells(Rows.Count, "F").End(xlUp).Row
   Range("E1:o" & iLastRow).Select
   Selection.Copy
   HM_0
   ocistiti
End Sub
Sub HM_0()
 Sheets("baza").Activate
    Dim baza As ListObject
    Set baza = ActiveSheet.ListObjects(1)
    baza.Range.Rows(baza.Range.Rows.Count).Cells(iLastRow + 2, 5).Select
    ActiveSheet.Paste
    Range("A1").Select
    Sheets("GO").Activate
    Range("E1").Select
End Sub
Sub HM_1()
   Dim iLastRow As Long
   iLastRow = Cells(Rows.Count, "F").End(xlUp).Row
   Range("E1:E" & iLastRow).Select
   Selection.Copy
   HM_2
End Sub
Sub HM_2()
 Sheets("L").Activate
    Dim L As ListObject
    Set L = ActiveSheet.ListObjects(1)
   L.Range.Rows(L.Range.Rows.Count).Cells(iLastRow + 2, 1).Select
    ActiveSheet.Paste
    
    Range("A1").Select
    Sheets("GO").Activate
    Range("E1").Select
End Sub
Sub ocistiti()
Columns("E:CC").Select
    Selection.Delete Shift:=xlToLeft
    Range("E1").Select
   End Sub

Sub import_PS()
ocistiti
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;file:///D:\Poker\PS\Playing history audit.html" _
        , Destination:=Range("$E$1"))
         .Name = "Playing%20history%20audit"
        .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 = True
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
    Columns("E:AA").Select
    Columns("E:AA").EntireColumn.AutoFit
    Range("E1").Select
End Sub
Sub PS_GO()
Range("E1:Q3").Select
    Selection.Delete Shift:=xlUp
    Columns("I:I").Select
    Selection.Delete Shift:=xlToLeft
    Columns("J:L").Select
    Selection.Delete Shift:=xlToLeft
    Columns("K:M").Select
    Selection.Delete Shift:=xlToLeft
    Dim iLastRow As Long
   iLastRow = Cells(Rows.Count, "F").End(xlUp).Row
   Range("E1:j" & iLastRow).Select
   Selection.Copy
   PS_0
   ocistiti
End Sub

Sub PS_0()
 Sheets("PS").Activate
    Dim PS As ListObject
    Set PS = ActiveSheet.ListObjects(1)
    PS.Range.Rows(PS.Range.Rows.Count).Cells(iLastRow + 2, 4).Select
    ActiveSheet.Paste
    Range("A1").Select
   Sheets("GO").Activate
   Range("E1").Select
End Sub
Sub udaliti_PS()
    Worksheets("PS").Rows(4 & ":" & Worksheets("PS").Rows.Count).Delete
End Sub

Sub udaliti_HM()
Sheets("Baza").Activate
Worksheets("Baza").Rows(6 & ":" & Worksheets("Baza").Rows.Count).Delete
End Sub


