john-86
03-16-2006, 05:10 AM
This line is to import a table into Access:
DoCmd.TransferSpreadsheet acImport, 0, "GIS Import Table", "M:\John Gregson\Fishing Meids\GIS Element\Export_Output.xls", True, "A1:D5"
I can use Justin's 'browse for file' function to get the path of the table to be imported. I was wondering how to automate the cell selection. Basically, the function needs to look at A1, see that there's data, move to B1, then C1 until it finds a blank cell. Then go down the rows to find the limit there.
Can this be done in Access alone? Or would Excel have to be opened to determine the range?
Regards,
John
DoCmd.TransferSpreadsheet acImport, 0, "GIS Import Table", "M:\John Gregson\Fishing Meids\GIS Element\Export_Output.xls", True, "A1:D5"
I can use Justin's 'browse for file' function to get the path of the table to be imported. I was wondering how to automate the cell selection. Basically, the function needs to look at A1, see that there's data, move to B1, then C1 until it finds a blank cell. Then go down the rows to find the limit there.
Can this be done in Access alone? Or would Excel have to be opened to determine the range?
Regards,
John