Greetings guys, I’ve got a rather simple application that I need to modify. I’m just having a little difficulty with one part of it with regards to the new dictionary for Excel 2004.
What I essentially have is a script that retrieves information from a form in the following format:
First name
Last Name
[Radio buttons]: Current smoker, Ex smoker, Never smoked
[Radio] Male, female
[Check box] Proteinuria ( check or not check )
( And then about 5 other various columns of information ).
All of this information is assigned to global variables. I didn’t write some of the script, but I the radio buttons are linked to a matrix. (The matrixes go 0, 1, 2 from left to right, correct?)
This information is then calculated and output into a personalized document for medical patients.
But, the second task…the one I need help with, is putting the initial entry information into a .xls spreadsheet. Should be fairly easy, just not that familiar with doing it and I’m far from a proficient applescript user. What I would probably want to do would be take each of the initial variables and assign them to a row or column in an excel document, then just feed the information in. I would want to use a saved .xls file on a local drive (Don’t worry, multiple users wouldn’t be accessing at the same time).
So basically, I need code that will call Microsoft excel, activate it, open my specified worksheet, make sure it is open. Then this script should find the NEXT open column and automatically put the information into each sequential field, then save it. I just have to make sure not to overwrite existing information.
Main concerns would likely be:
#1. Finding next available columns ( I just couldn’t find a good way to do this in the excel dictionary ).
#2. Interpreting the Radio button matrices as smoking, nonsmoking, ex smoker, etc. I could theoretically leave these as their original [0,1,2] though.
This stuff seems pretty basic, I’ve just run into a few problems so I was wondering if anyone could help me. Some code is available on request.