G
Guest
Hi,
I was trying to import a table, with both commands:
TransferText - for *.txt file
TransferSpreadsheet - for *.xls file
and I got a problem with both of them.
In TransferSpreadsheet- all the columns connect to one column after importing.
The code i used :
DoCmd.TransferText acImportDelim,"", "tbl_data2", File1, -1
DoCmd.TransferText acImportDelim, , "tbl_data2", File1, -1
Both didn’t work. In the text file I separated the columns with ‘tab’
In TransferSpreadsheet- all data is copied into the table, but for some
reason the table get about 5000 empty rows in the begging, and on other times
it’s copied to the end of the last table – what i need is to replace the data
of the last table.
The code i used :
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="tbl_data2", _
FileName:=File1, Hasfieldnames:=True, SpreadsheetType:=8
Thanks all
Dana.
I was trying to import a table, with both commands:
TransferText - for *.txt file
TransferSpreadsheet - for *.xls file
and I got a problem with both of them.
In TransferSpreadsheet- all the columns connect to one column after importing.
The code i used :
DoCmd.TransferText acImportDelim,"", "tbl_data2", File1, -1
DoCmd.TransferText acImportDelim, , "tbl_data2", File1, -1
Both didn’t work. In the text file I separated the columns with ‘tab’
In TransferSpreadsheet- all data is copied into the table, but for some
reason the table get about 5000 empty rows in the begging, and on other times
it’s copied to the end of the last table – what i need is to replace the data
of the last table.
The code i used :
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="tbl_data2", _
FileName:=File1, Hasfieldnames:=True, SpreadsheetType:=8
Thanks all
Dana.