graph orientation in Excel

L

Li Chen

Hi guys,

I copy one script as follows to draw a graph. The result is a
column-based serial, which means I get two lines composed of 3-2-1 and
10-6-3. My question is how I tell the script so that I get row-based
serial(3 lines), which are 3-10,2-6 and 1-3. Aslo how do find these
methods by querying Ruby. I try ri WIN32OLE but don't get much
information.


Thanks,

Li


############excel.rb
require 'win32ole'

excel = WIN32OLE.new("excel.application")

excel['Visible'] = TRUE;
workbook = excel.Workbooks.Add();
excel.Range("a1:b1").Value= [3,10]
excel.Range("a2:b2").Value= [2,6]
excel.Range("a3:b3").Value = [1,3]

ChartTypeVal=4
excel.Range("a1:b3").Select();
excelchart = workbook.Charts.Add();
excelchart['Type'] = ChartTypeVal;

savefile='C:\Ruby\self\excel1.xls';
excelchart.Saved(savefile);

excel.ActiveWorkbook.Close(0);
excel.Quit();
 
D

David Vallner

--------------enig4C3948C8B264F0953B395ADA
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Li said:
Hi guys,
=20
I copy one script as follows to draw a graph. The result is a=20
column-based serial, which means I get two lines composed of 3-2-1 and =
10-6-3. My question is how I tell the script so that I get row-based=20
serial(3 lines), which are 3-10,2-6 and 1-3. Aslo how do find these=20
methods by querying Ruby. I try ri WIN32OLE but don't get much=20
information.
=20

Read the Excel documentation? Win32Ole is just an interface to its COM
API that lets you access those functions.

David Vallner


--------------enig4C3948C8B264F0953B395ADA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFVd+9y6MhrS8astoRAsn1AJ9u1PwQGoeIb0joI+EdFUnIJZoSpACfZOJ9
z6nQIDK6PqE4SDKFKOyG8Ck=
=MLiM
-----END PGP SIGNATURE-----

--------------enig4C3948C8B264F0953B395ADA--
 
L

Li Chen

David said:
Read the Excel documentation? Win32Ole is just an interface to its COM
API that lets you access those functions.

David Vallner

Thanks and I get it.

Li
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top