From: Mike Stephens Date: 2011-01-11T21:00:30+09:00 Subject: Re: Draw Line chart Fan Jin wrote in post #973892: > I still have some problems with get the Range from the > table which imported from the MS Access, cos I do not want to set the > range every time with new table imported. Please give me more hints with > how to do this, thanks. Excel does have concepts of the currently active range etc without you necessarily telling it the details but I would be inclined to use Ruby to read the Access table into an array and then plonk the data into a range (rather than getting Excel to import it). It's just a simple assignment. Since you can find the number of rows retrieved, you can easily get Ruby to calculate the range. I guess that will be easier when you then get Ruby to request the Chart. Look at the Ruby on Windows blog to see how to access Access (Jet) - it's only a few lines of code. -- Posted via http://www.ruby-forum.com/.