Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Autoformat Excel column

As a last step in an applescript, I'm trying to autoformat the columns in an Excel sheet so that all text fits. If I use:


set myColumn to range ("A:C")

autoformat myColumn


it works but strips out the format, font, border, etc. If I use


set myColumn to range ("A:C")

autoformat myColumn with width without format, font, alignment, border and pattern


it doesn't reformat the column to autofit the text. Any ideas what I'm doing wrong?

MacBook Pro with Retina display, OS X El Capitan (10.11.4)

Posted on May 6, 2016 5:10 AM

Reply
1 reply

May 6, 2016 6:37 AM in response to Niftyix

Hi,

You must specify the range format, like this:

autoformatmyColumnformatrange autoformat simple without font, alignment, border and pattern


Or this:

autoformatmyColumnformatrange autoformat classic 1 without font, alignment, border and pattern


Or, use one in this list (depending on what you want):

(range autoformat threeD effects 1, range autoformat threeD effects 2, range autoformat accounting 1, range autoformat accounting 2, range autoformat accounting 3, range autoformat accounting 4, range autoformat classic 1, range autoformat classic 2, range autoformat classic 3, range autoformat color 1, range autoformat color 2, range autoformat color 3, range autoformat list 1, range autoformat list 2, range autoformat list 3, range autoformat local format 1, range autoformat local format 2, range autoformat local format 3, range autoformat local format 4, range autoformat none, range autoformat simple)

Autoformat Excel column

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.