Hi all!
I've been working on a database to convert an automatically generated report into a text file for further processing.
It all works perfectly, except for the import.
I download a file every day, which will have a different name every day (starts with 'report' and then seemingly random numbers, i can't find a logic in it). This file claims to be a .xls, but when opening/saving it shows as a html doc. I then use Save As, to save it as a static file name (i.e. Access.xlsx).
When i select this file as import in Access, it works fine, and i save it as SavedImport, so i can set an AutoExec on it.
However, if i download a new report, and save it under the same name (Access.xlsx) and try to run the AutoExec (or manually), i get an error:
'OriginalFileNameOfDownloadedReport' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
It works correctly if i manually import it, and then even on the AutoExec, but once the file has been replaced with a new file (with the exact same static file name), it gives this error.
It seems to want to refer to some kind of sub-name (the original name of the file), even though the import path is set to the static name.
EDIT: i've also tried it with the same as .xls file, but it gave the same error.
Attached the 2 excel files. the .xls is how i download it, and the .xlsx is the same but then save d as .xlsx. I tried attaching the Access database, but it gives an error (failed to upload).
What the database does, is reformat the columns/rows from the excel into a text file for use in Word Mail Merger.
Report.zip
Anyone know what this could be?
Thanks!