Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using setvalue in excel automation

Status
Not open for further replies.

jayjay60

Programmer
Jun 19, 2001
97
0
0
FR
I've created an application which automates excel 97 (thanks to the help of the microsoft supports articles Q178749, for example).
As i want to automate excel, with office 97, i need of the following library Excel8.olb. So, in my project I would fill some range in an excel worksheet, to do it i use the function setvalue, which takes (with office 97) only one parameter, a COleVariant; but now here is my problem, when i try to do the same thing with office XP( i've seen that i have to replace excel8.olb, by excel.exe) the same function need of 2 input parameters, now!!!
Setvalue(COleVariant, COleVariant). One of this parameter is naturally the same that hte one i've used with excel 97, but the second one, i don't what i ve to put!
I'm sorry of my approximating english, but if someone could understand me and help me to solve this problem, he will be really great

thanks in advance for your help

jayjay
 
usually
oleobject.Setvalue(COleVariant x, COleVariant y) is something like this (to say it in other words):
oleobject.value[y] = x

It is wrong to write this code in C++, but you should be thinking about some more parameters in dispatch property set like about indexes in arrays.
Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top