Я хотел бы скопировать данные из SAP в таблицу, я могу скопировать их, но таблица перемещается вправо.
Sub StartExtract()
Application.WorksheetFunction.Transpose (X)
' Set the sid and client to connect to
W_System = "P10320"
' Run the GUI script
RunGUIScript
' End the GUI session
objSess.EndTransaction
' Switch to the worksheet where the data is loaded to
Application.WorksheetFunction.Transpose (BGSOCIAL)
Sheets("BGSOCIAL").Select
' Load the CSV file
OpenCSVFile
' Update the time and date on the control worksheet
Sheets("Extraction").Select
Cells(2, 2).Value = Now()
Я думаю, что это та часть кода, которая является проблемой.
Я хотел бы скопировать их в таблицу
![the data is copied next to it](https://i.stack.imgur.com/qsh3P.png)
другая часть кода
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & fpath & "\" & ffilename, Destination:=Range("$A$1"))
.Name = "text"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = "|"
.TextFileColumnDataTypes = Array(1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
Конец