mhmaid wrote:
> I have more than 200 excel sheets files , each file contains one
> record these files are created automatically thru our mdis system ,
> which will export the date of a single record to a xl file ,
>
> what i want to do is , importing the data to a new table in access
> when i try to open , i got an error msg , because the files are saved
> as text( tab delimited)
>
> in order to be able to import a file to access , i first need to open
> each file and save it as of type excel
>
> but is is possible to change the type of all of the files by code
> all files are kept in one folder in c drive
Access will directly open and read various types of files including TXT,
CSV, and XLS files without any changing or conversion. Set your import
dialog to the proper filetype and you won't have to worry about converting
anything. If you want to rename files, use the Mid() function to find the
first instance of a . (period or dot) and capture the rest of the filename
(the extension) the use rename to change it as in:
RENAME [drive:][path]filename1 filename2
or:
REN [drive:][path]filename1 filename2
>> Stay informed about: change file type via code