ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to disable General formatting when opening CSV (https://www.excelbanter.com/excel-discussion-misc-queries/222172-how-disable-general-formatting-when-opening-csv.html)

Cory_Jackson

How to disable General formatting when opening CSV
 
My users receive various CSV, TXT, and TSV files in various formats and from
various sources and they are in the habit of double clicking (or right click
- Open with) the files to open them in Excel. Excel then interprets all the
text value and applies a General format without warning the user. This
results in data corruption when it guesses wrong. EG an account code of
"1sep" gets corrupted into a date value of "9/1/2009" or a ZIP code string of
"08651" is converted to an integer "8651". How do I disable this 'feature' or
change the default type to Text?

I realize one can import with the Wizard as a workaround as well as writing
specific import macros but this is not the solution I am looking for.

Dave Peterson

How to disable General formatting when opening CSV
 
I'd bite the bullet and rename the text files as .txt and make sure that the
program associated with the .txt extension is NotePad (or any other text
editor).

Then I'd tell the users to open excel and use File|Open (ctrl-o) to open the
..txt file and parse the data.

But...

If the layout of the file is always the same, I'd provide the users with a
workbook that contained a macro that would ask for the name of the file, rename
it (or copy it to a .txt file), open it and parse it.

Then it could even add headers, filters, pivottables, formatting, page setup
stuff...



Cory_Jackson wrote:

My users receive various CSV, TXT, and TSV files in various formats and from
various sources and they are in the habit of double clicking (or right click
- Open with) the files to open them in Excel. Excel then interprets all the
text value and applies a General format without warning the user. This
results in data corruption when it guesses wrong. EG an account code of
"1sep" gets corrupted into a date value of "9/1/2009" or a ZIP code string of
"08651" is converted to an integer "8651". How do I disable this 'feature' or
change the default type to Text?

I realize one can import with the Wizard as a workaround as well as writing
specific import macros but this is not the solution I am looking for.


--

Dave Peterson


All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com