Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.