Hi there,
I am trying to import excel files in access via the following code:
CD.DialogTitle = "Select any one of the NOR files and press OPEN"
CD.ShowOpen
FileName = CD.FileName
DoCmd.TransferSpreadsheet acImportDelim, , "tbl_Nursery_Schools+Units_FT", FileName, True
I am running this code to import several excel files. The problem i am getting is that a few of them dont get the coloum name right . Instead of exact coloumn name,it comes as F1,F2.......etc. And also if the first record of any coloumn has no value in it , then it automatically takes them as 'text' type, whereas I want all of them as 'Number' type.
Is there is any way so that I can fix the coloumn name and their type by VB code.
Thanks in Advance
I am trying to import excel files in access via the following code:
CD.DialogTitle = "Select any one of the NOR files and press OPEN"
CD.ShowOpen
FileName = CD.FileName
DoCmd.TransferSpreadsheet acImportDelim, , "tbl_Nursery_Schools+Units_FT", FileName, True
I am running this code to import several excel files. The problem i am getting is that a few of them dont get the coloum name right . Instead of exact coloumn name,it comes as F1,F2.......etc. And also if the first record of any coloumn has no value in it , then it automatically takes them as 'text' type, whereas I want all of them as 'Number' type.
Is there is any way so that I can fix the coloumn name and their type by VB code.
Thanks in Advance