Sam Hamels
New Member
- Joined
- Mar 20, 2018
- Messages
- 49
In Excel 2016, I import data from .txt files by using the "From Text" under the "Data" tab in the top ribbon.
The .txt files consist of a header (e.g. "Apples") and a list of entries. Opening a .txt file in Notepad would look something like this:
Apples
5
4
8
9
...
The .txt files are automatically generated by another software program that I use.
Each dataset imported from a .txt file is put in a separate worksheet in my Excel file.
If the .txt files are updated, changing the data in the files, I can simply click "Refresh All" and the updated data is correctly imported into my Excel file.
However, for some .txt files, they may sometimes be deleted temporarily, and automatically created again at a later time.
During times when some .txt files are temporarily deleted, I still need to be able to "Refresh All" in Excel, updating the data from the .txt files that do still exist.
When this happens, Excel prompts an error message saying "Could not find file", which is logical since the .txt file it is looking for to update the values is indeed gone (albeit temporarily).
My question: If Excel, upon "refreshing" all the imported data, cannot find a particular .txt file because it has been deleted, I want it to simply delete the data imported from the previously existing .txt file and not prompt me an error message. Is this possible and if so, how?
Many thanks!
Sam
The .txt files consist of a header (e.g. "Apples") and a list of entries. Opening a .txt file in Notepad would look something like this:
Apples
5
4
8
9
...
The .txt files are automatically generated by another software program that I use.
Each dataset imported from a .txt file is put in a separate worksheet in my Excel file.
If the .txt files are updated, changing the data in the files, I can simply click "Refresh All" and the updated data is correctly imported into my Excel file.
However, for some .txt files, they may sometimes be deleted temporarily, and automatically created again at a later time.
During times when some .txt files are temporarily deleted, I still need to be able to "Refresh All" in Excel, updating the data from the .txt files that do still exist.
When this happens, Excel prompts an error message saying "Could not find file", which is logical since the .txt file it is looking for to update the values is indeed gone (albeit temporarily).
My question: If Excel, upon "refreshing" all the imported data, cannot find a particular .txt file because it has been deleted, I want it to simply delete the data imported from the previously existing .txt file and not prompt me an error message. Is this possible and if so, how?
Many thanks!
Sam