Re: Auto Resize columns on opening a text file in Excel
Re: Auto Resize columns on opening a text file in Excel
- Subject: Re: Auto Resize columns on opening a text file in Excel
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 07 Dec 2011 18:54:07 -0800
- Thread-topic: Auto Resize columns on opening a text file in Excel
Title: Re: Auto Resize columns on opening a text file in Excel
On 12/7/11 6:10 PM, "Spelean" <email@hidden> wrote:
I'm creating tab delimited text files from a database.
I'd like Excel to auto resize the columns to the max width in each column after opening.
This is akin to selecting all the columns manually and then double clicking the column divider in the header
Is there an inbuilt applescript command that will do this?
something like
set column width of cell "A1:AD1" to (auto) ?
tell application "Microsoft Excel"
set ur to used range of active sheet
repeat with i from 1 to (count columns of ur)
autofit column i of ur
end repeat
end tell
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden