View Full Version : How do I extract values from a named range in excel?

03-13-2009, 11:32 AM
Hello, I'm fairly new to Javascript and excel and have struggled with this for days now. No amount of Googling has revealed the answer to me.

How do I access the values in a named range in Excel using Javascript?

I can see how to access a single value in a known location e.g.

var1 = Excel.Workbooks.ActiveSheet.Cells(1,1).Value;

how do I retrieve the values in a named range e.g. "MyRange" and assign them to variables?

I can retrieve the address of the range but cant see how that helps me to loop through the values in the range and assign them. I have played with for in statements to try a for each approach to the range but can't get that to work.

Any help appreciated.

Thank you.