Re: Parsing Excel files for Comments
Re: Parsing Excel files for Comments
- Subject: Re: Parsing Excel files for Comments
- From: David Wignall <email@hidden>
- Date: Sun, 22 Apr 2012 21:25:48 +1200
On Wed, Apr 18, 2012 at 09:49, Patrik <email@hidden> wrote:
> Hi, I just started fours days ago scripting Excel 2011 and found some tips
> on line but ran into a speed bug when parsing an Excel file for comments.
> I basically use the Comment field as a label and want to replace out the
> content of a cell based on the comment label so to speak.
>
> All works fine but the parsing of a file with more than 3600 cells takes
> over 10 minutes and longer files don't even finish. Any ideas on how I can
> either modify the script to run faster or is there some other way of
> labeling a cell with a unique "tag" similar to Indesigns XML tags. Again I
> am totally new to scripting excel.
Haven't done any real testing but something like this perhaps?
set AllSheets to (sheets of active workbook)
repeat with EachSheet in AllSheets
set rngComments to areas of (special cells (used range of active
sheet) type (cell type comments))
repeat with EachRange in rngComments
display dialog (Excel comment text of Excel comment of EachRange)
end repeat
end repeat
--
Dave
_______________________________________________
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