ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Can the way Excel default opens a *.csv be changed? (https://www.excelbanter.com/excel-discussion-misc-queries/212507-can-way-excel-default-opens-%2A-csv-changed.html)

Adam_needs_help

Can the way Excel default opens a *.csv be changed?
 
I don't want excel to assume every entry should be formatted as "general" but
rather as "text" so I don't loose any leading zeros in number i have stored
in a text file. Its annoying to have to use the wizard each time and change
the column types. I have a lot of files to open. I guess I could record and
use a macro to do it, but that might be a mess.

Let me know if there is a way to do this, thanks.

Dave Peterson

Can the way Excel default opens a *.csv be changed?
 
If you decide to record a macro and use that, then you'll want to do this:

Change the filename from .csv to .txt
then record the macro when you open the .txt file.

Excel's VBA will ignore any settings that you use when you replay the macro if
the file is named .csv.



Adam_needs_help wrote:

I don't want excel to assume every entry should be formatted as "general" but
rather as "text" so I don't loose any leading zeros in number i have stored
in a text file. Its annoying to have to use the wizard each time and change
the column types. I have a lot of files to open. I guess I could record and
use a macro to do it, but that might be a mess.

Let me know if there is a way to do this, thanks.


--

Dave Peterson


All times are GMT +1. The time now is 02:27 PM.

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