G
Guest
Hi,
I'm having a very rare, but deadly problem with Excel and Access. Every
day, I get data in an application-generated Excel sheet with always the same
structure, and I link it into an Access database by using the command:
DoCmd.TransferSpreadsheet acLink, , "tbInput", strPathAndFileName, False
I process that linked table with VBA code and store some of its columns and
data in another, permanent table in Access.
This works perfectly for about 95% of the cases. However, at unpredictable
times, suddenly a column in Excel which was full of numbers (but for the
first 3 rows because these contain headers) ends up, after the linking,
showing only "#Num!" where the numbers were. That crashes my code (with
numeric overflow error) which is reading the content of the spreadsheet,
because I'm expecting a number in that column, not an "#Num!". I can't make
out when this is happening, i.e. what's the cause. Moreover, this happens on
my users PC's, but NOT on my PC if I copy the DB and the Excel sheet ! It's
only one column, and when it happens, it's always affecting the same column.
Has any of you had this problem before, if yes what is it due to ? How can I
avoid it ?
I'd be VERY thankful for any help and hints on that one.
Regards
Balex
I'm having a very rare, but deadly problem with Excel and Access. Every
day, I get data in an application-generated Excel sheet with always the same
structure, and I link it into an Access database by using the command:
DoCmd.TransferSpreadsheet acLink, , "tbInput", strPathAndFileName, False
I process that linked table with VBA code and store some of its columns and
data in another, permanent table in Access.
This works perfectly for about 95% of the cases. However, at unpredictable
times, suddenly a column in Excel which was full of numbers (but for the
first 3 rows because these contain headers) ends up, after the linking,
showing only "#Num!" where the numbers were. That crashes my code (with
numeric overflow error) which is reading the content of the spreadsheet,
because I'm expecting a number in that column, not an "#Num!". I can't make
out when this is happening, i.e. what's the cause. Moreover, this happens on
my users PC's, but NOT on my PC if I copy the DB and the Excel sheet ! It's
only one column, and when it happens, it's always affecting the same column.
Has any of you had this problem before, if yes what is it due to ? How can I
avoid it ?
I'd be VERY thankful for any help and hints on that one.
Regards
Balex