Positronicus
New Member
- Joined
- Feb 25, 2011
- Messages
- 12
Shortest version of the question:
I want to learn to program Excel, using JScript, through its Automation interface. I can't find a comprehensive programmers reference manual detailing all aspects of the interface. Can you suggest one?
Intermediate length version:
I made progress! But it took me all afternoon to write this simple program:
app = WScript.CreateObject("Excel.Application");
wb = app.workbooks.add;
wb.Activesheet.Range("A1").Value = "TestData";
wb.Activesheet.Range("A2").Value = "MoreData";
app.Visible=true;
WScript.Sleep(5000);
app.quit();
Where can I find complete documentation on things like "app.workbooks.add" and "wb.Activesheet.Range("A1").Value", which is not scattered about on random web pages or in "How you would do this (if you actually had some documentation)" how-to articles?
Longest version:
Here's the real application: I have data from a scientific instrument rendered in comma-separated-value format. I can read the CSV file and manually create various charts, but it is impossibly tedious to do that by hand in every case. I would like to write a javascript which,
* Opens a CSV file and reads it
* Selects columns A, E, and F (for example)
* Does simple math within certain ranges (e.g. averages, max & min)
* Creates one or more scatter plots of a certain type
* Adds labels to the axes, changes X & Y ranges, turns off gridlines, etc.
* Saves the results as .xls for later printing (or print now)
That is to say, I would like to use Excel as a programmable graphics device. Obviously I need an excellent reference manual to puzzle it all out. Where should I start?
Thanks!
I want to learn to program Excel, using JScript, through its Automation interface. I can't find a comprehensive programmers reference manual detailing all aspects of the interface. Can you suggest one?
Intermediate length version:
I made progress! But it took me all afternoon to write this simple program:
app = WScript.CreateObject("Excel.Application");
wb = app.workbooks.add;
wb.Activesheet.Range("A1").Value = "TestData";
wb.Activesheet.Range("A2").Value = "MoreData";
app.Visible=true;
WScript.Sleep(5000);
app.quit();
Where can I find complete documentation on things like "app.workbooks.add" and "wb.Activesheet.Range("A1").Value", which is not scattered about on random web pages or in "How you would do this (if you actually had some documentation)" how-to articles?
Longest version:
Here's the real application: I have data from a scientific instrument rendered in comma-separated-value format. I can read the CSV file and manually create various charts, but it is impossibly tedious to do that by hand in every case. I would like to write a javascript which,
* Opens a CSV file and reads it
* Selects columns A, E, and F (for example)
* Does simple math within certain ranges (e.g. averages, max & min)
* Creates one or more scatter plots of a certain type
* Adds labels to the axes, changes X & Y ranges, turns off gridlines, etc.
* Saves the results as .xls for later printing (or print now)
That is to say, I would like to use Excel as a programmable graphics device. Obviously I need an excellent reference manual to puzzle it all out. Where should I start?
Thanks!
Last edited: