Default column width opeing *.csv in Excel

N

Netnathan

How do you set default column width when opening a *.csv in Excel?
Changing files in \XlStart directory did not help.

-nn
 
N

Nick Hodge

As it is a csv you will only be able to do this in code. If it is the same
file layout each time, why not record a macro in your personal.xls file and
run this each time

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
N

Netnathan

Where would I store this personal.xls file so it will be accessed when I
double click on the *.csv.

-nn
 
N

Nick Hodge

When you record a macro, you get options to store the code in 'This
workbook' or personal.xls. The latter is stored, as a hidden workbook in
xlStart, but as it opens each time Excel does (hidden), then the code in it
is available all the time.

To record the code, open the csv first then start the macro recorder
(tools>macros.record new) and select personal workbook. Make the formatting
changes and close. When asked if you want to save personal.xls say yes and
now each time you want to run it, open the csv and select Tolls>Macros>run
macros and select it from the list and the formatting you did when recording
will be repeated

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top