Hi
I have the following problem, I hope someone can help me.
I receive excel sheets automatically which have extensions of .XLS however when they open up they "seem to" be TXT files instead. I process these files with an Acess application.
If I just double click on them they open up correctly with excel. I just have to save as ".XLS" instead of the "Text, Tab Delimited" format which seems to always appear in the Save As field.
There is obviously something wrong with the files (seem like they are TXT files but with an .XLS extension).
I cannot change how they are received.
So I am manually opening them, then saving them as XLS. This works and I can then process it with Access.
However with my Access application, if I try to open them (and then save them) with objExcel.Workbooks.Open (the_XLS_File_name), they don't seem to open up like they do when you click on them.
For example, the date fields, which all look as DD/MM/YY when you double click to open the file, are all mixed up as DD/MM/YY and DD/MM/YYYY when open with Visual Basic code.
This obviously causes a problem.
I've also tried to run a macro on excel (Auto) that, when file is open, it is saved as ".XLS" instead of TXT (like I do manually) but this still has the same problem.
Is like the Visual Basic Code doesn't do the same thing as when you double click on the file.
Any ideas how to automatically convert these files and keeping the right format ?
thank you
I have the following problem, I hope someone can help me.
I receive excel sheets automatically which have extensions of .XLS however when they open up they "seem to" be TXT files instead. I process these files with an Acess application.
If I just double click on them they open up correctly with excel. I just have to save as ".XLS" instead of the "Text, Tab Delimited" format which seems to always appear in the Save As field.
There is obviously something wrong with the files (seem like they are TXT files but with an .XLS extension).
I cannot change how they are received.
So I am manually opening them, then saving them as XLS. This works and I can then process it with Access.
However with my Access application, if I try to open them (and then save them) with objExcel.Workbooks.Open (the_XLS_File_name), they don't seem to open up like they do when you click on them.
For example, the date fields, which all look as DD/MM/YY when you double click to open the file, are all mixed up as DD/MM/YY and DD/MM/YYYY when open with Visual Basic code.
This obviously causes a problem.
I've also tried to run a macro on excel (Auto) that, when file is open, it is saved as ".XLS" instead of TXT (like I do manually) but this still has the same problem.
Is like the Visual Basic Code doesn't do the same thing as when you double click on the file.
Any ideas how to automatically convert these files and keeping the right format ?
thank you