From: Fan Jin Date: 2011-01-12T19:14:08+09:00 Subject: Re: Draw Line chart Mike Stephens wrote in post #973911: > 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. Hi: I have successfully read data into arrays a[] and b[], but I do not know how to plonk the data into range format for drawing chart in excel. Could you show me more details,please? Thanks. -Jin Fan -- Posted via http://www.ruby-forum.com/.