If they are all default, it looks at the first X rows of data. To continue that thought:Īccess determines the field types when linking to or importing Excel files based on the field types in Excel. This is an old post but the issue persists! I agree with Deepak. In short, this solution doesn't allow me to change the datatype myself, but it makes Access accurately guess the datatype so that there are fewer issues. I liked it as an answer because it's a one-time-only step that can be used to solve my major problem (having Access incorrectly assign a datatype). However, I chose the registry setting answer by DK as the "Accepted Answer". The advice for saving an import specification is very helpful too. Saving the Excel file as a CSV and then importing that works well and is straightforward like Chris OC says. If I had been allowed to change the datatype on import, it would have saved me some trouble.Īm I asking for something that Access just won't do, or am I missing something? Thanks.ĮDIT: There are two answers below that give useful advice. Access assumed it was a Number datatype (even after I changed the Format value in the Excel file itself) and so gave me errors on those alpha codes. For some reason - maybe it's always Excel files, maybe there's something else - I am sometimes not allowed to change the datatype: the dropdown box is grayed out and I just have to live with whatever datatype Access assumes is correct.įor example, I just tried importing a large-ish Excel file ( 12000+ rows, ~200 columns) in Access where column #105 (or something similar) was filled with mostly numbers (codes: 1=foo, 2=bar, etc), though there are a handful of alpha codes in there too (A=boo, B=far, etc). I know that I sometimes have the freedom to assign any datatype to each column that is being imported, but that could only be when I'm importing non-Excel files.ĮDIT: To be clear, I understand that there is a step in the import process where you are allowed to change the datatype of the imported column. Is there any way to change the default datatype when importing an Excel file into Access? (I'm using Access 2003, by the way).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |