Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have often to open CSV files in Excel (14.0.6112.5000; Office 2010). The data is filled well in the columns, but the DateTime values exceed the default column with and are display as ######. So I have to manually change this width. Further I would like to have to freeze the window at row/colum C2.

Is there a way to do this when opening a CSV automatically or have a script that can be activated by a button?

share|improve this question
up vote 1 down vote accepted

You could do this by recording a macro. So choose the Developer tab, and Record Macro.

Then do the sequence Ctrl-AAlt-Hoi

This selects all, goes to the Home tab, format, and autofit columns

And stop recording the macro. You can then save the macro, and give it a shortcut key to activate it when you want.

You could also carry out the freeze panes for the top row this way also.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.