Hi,
I have an excel file coming from a 3rd party supplier as a source. One of the fields in the excel contains serial numbers, which are in most cases just numbers but occasionally there are cells which begin with characters, followed by numbers. When I link the excel to Access (2016), the serial number column is automatically assigned "Number" Data Type. I wouldn't want to convert the excel to a local table, since it changes almost daily on a shared folder, so keeping it as linked works best.
However, this leads to a problem. When I generate a query to pull the data from the excel file to a table (with modifications), all of the serial numbers which have characters in the cells appear as empty cells in the Access table. If I use Str, Right or Left strings, the same happens. If I use Val or Cstr, both lead into a Null or conversion error.
How can I get Access to understand that the source should not be numbers but text, and it would therefore handle the source data as text before doing anything else to it? Or is this a lost cause...?
Thank you!
Best regards,
Yari
I have an excel file coming from a 3rd party supplier as a source. One of the fields in the excel contains serial numbers, which are in most cases just numbers but occasionally there are cells which begin with characters, followed by numbers. When I link the excel to Access (2016), the serial number column is automatically assigned "Number" Data Type. I wouldn't want to convert the excel to a local table, since it changes almost daily on a shared folder, so keeping it as linked works best.
However, this leads to a problem. When I generate a query to pull the data from the excel file to a table (with modifications), all of the serial numbers which have characters in the cells appear as empty cells in the Access table. If I use Str, Right or Left strings, the same happens. If I use Val or Cstr, both lead into a Null or conversion error.
How can I get Access to understand that the source should not be numbers but text, and it would therefore handle the source data as text before doing anything else to it? Or is this a lost cause...?
Thank you!
Best regards,
Yari