file extensions in table name after using TransferSpreadsheet (1 Viewer)

vba_php

Banned
Joined
Oct 6, 2019
Messages
1,974
this is another weird problem, of many, that I've seen with this program. can anybody here explain why this is happening? I am using FSO to import multiple xlsx files:



and of course there is no file extension string showing in windows explorer, but after importing these, I see this:



if I remember right, the last time I did this, it did not happen this way. there was never any "_xlsx" string on the end of the table names. is this normal? During this current testing process, there have been other weird occurences that have happened that have made no sense whatsoever, even after doing a C & R operation on the database, but they are not worth mentioning in this thread. Anyone ever seen this before? It's not really a big deal, as I can always truncate the unwanted text off, but still....
 

Attachments

Ranman256

Registered User
Joined
Apr 9, 2015
Messages
3,426
the files DO have extensions, its just that your file explorer is set to hide them.
you can turn off that 'hide' setting and it will show the extension.
you shouldnt import and store each file...instead import each file to a single table.
the table can store the filename as well as the data.
this prevents your database from filling up thousands of useless tables when you have the excel file stored in a folder.
 

Minty

AWF VIP
Joined
Jul 26, 2013
Messages
6,531
If you import using the access ribbon this doesn't happen. So it must be normal behaviour for the FSO.
 

gemma-the-husky

Super Moderator
Staff member
Joined
Sep 12, 2006
Messages
13,873
I tend to show file extensions in my browsers. However, note that access can't have a period in a table name, so as you can see your imported table has an underscore instead of a period.

I imagine you could give the new table a name that excludes the file extension with a bit of code.

this sort of thing. (aircode)
left(filename(instrrev(filename,".")-1))
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom