title: Column getting deleted after Executing Macro in Excel 2013
body: <p>I have written macro to import three columns from csv file to excel file which has 4 columns. 1 column is formulated based on 3 coming from csv file. So before running macro, there is excel file with 3 blank columns(not even column name) and 4th column with default values. Now when I run the macro, 3 columns are getting imported frm csv but 4th column is getting deleted.I don't know why this is happening. I have used Record Macro functionality to create macro. Below is my macro code: </p>
  
  <pre><code>Private Sub Workbook_Open()
  Sheet11.Cells.ClearContents
  With ActiveSheet.QueryTables.Add(Connection:= _
          "TEXT;D:\Sample SSRS\power View\AlertHistory.csv", Destination:=Range("$A$1") _
          )
          .Name = "AlertHistory"
          .FieldNames = True
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .PreserveFormatting = True
          .RefreshOnFileOpen = False
          .RefreshStyle = xlInsertDeleteCells
          .SavePassword = False
          .SaveData = True
          .AdjustColumnWidth = True
          .RefreshPeriod = 0
          .TextFilePromptOnRefresh = False
          .TextFilePlatform = 437
          .TextFileStartRow = 1
          .TextFileParseType = xlDelimited
          .TextFileTextQualifier = xlTextQualifierDoubleQuote
          .TextFileConsecutiveDelimiter = False
          .TextFileTabDelimiter = False
          .TextFileSemicolonDelimiter = False
          .TextFileCommaDelimiter = True
          .TextFileSpaceDelimiter = False
          .TextFileColumnDataTypes = Array(1, 1, 1)
          .TextFileTrailingMinusNumbers = True
          .Refresh BackgroundQuery:=False
      End With
  End Sub
  </code></pre>
  
  <p>Please help.</p>