Storing a column of data as a list object

hey guys, I'm an intern at AppleCare(SG) where they rely heavily on AppleScript to automate some manual tasks.

I've been searching high and low for a solution to a problem but it has eluded me for a couple days now. I can't believe there's not easy way to do this! 😀

I'm using Excel 2004 cos that's the only version that allows you to run macros.

Here's what I wanna do: I wanna put a column's worth of Excel data and store it as a list object so that I can iterate through each item in the list. Say the column has 56 rows of data from A1:A56.

I'd appreciate any pointers in the right direction. Thank you!

Cheers,
Wilfred

Message was edited by: wilfredph

Early '08 MacBook Pro, Mac OS X (10.6.4)

Posted on Jul 21, 2010 8:25 PM

Reply
1 reply

Jul 22, 2010 2:28 PM in response to wilfredph

Hello

You may use something like this :

tell application "Excel"
set vlist to value of range "A1:A56" of active sheet
end
return vlist -- list of list of values

tell application "Excel"
set flist to formula of range "A1:A56" of active sheet
end
return flist -- list of list of formulae


cf.
http://www.microsoft.com/mac/developers/default.mspx
(download the Excel2004AppleScriptRef.pdf)

Good luck,
H

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Storing a column of data as a list object

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