07-02-2007 03:04 AM
07-02-2007 06:02 AM - edited 07-02-2007 06:02 AM
Message Edited by ebalci on 07-02-2007 02:02 PM
07-02-2007 07:38 AM
thanks you for your help,
I have another question, exemple:
ExcelRpt_InsertRow
HRESULT ExcelRpt_InsertRow (CAObjHandle worksheetHandle, int insertBeforeRowIndex, int numberOfRows);
could you explain me what is CAObjHandle? this is my excel file name? I don't understand what is it.... I'm sorry 😉
07-02-2007 11:51 PM - edited 07-02-2007 11:51 PM
Hi,
CAObjHandle is a type name. Just like a char or double. But it is actually an alias. In some .h file it is defined as an alias name to the well-known type int.
So practically it stores an integer value.
Functionally, it is a "handle".
It is NOT a file name. It is more like an ID number.
Once you obtain one, you can use it whenever you want to refer to a specific object within your program. This object may be a worksheet, a workbook or even the currently open Excel application itself.
For the function you asked it is a "handle" you should have obtained before you call that function. For this purpose you can use one of the following functions, whichever suits your application better: ExcelRpt_GetWorksheetFromIndex or ExcelRpt_GetWorksheetFromName.
Hope this helps.
Message Edited by ebalci on 07-03-2007 07:53 AM
07-03-2007 10:26 AM
thanks for your help, I understood what are CAObjHandle, ExcelObj_Line etc...
I finally use excel200.fp, because there is more exemple with this file. I open new file, select the good sheet but when I try to insert line with HRESULT CVIFUNC Excel_LinesAdd (CAObjHandle objectHandle, ERRORINFO *errorInfo, double x1, double y1, double x2, double y2, ExcelObj_Line *returnValue) the return value is an error because I don't know what is x1,y1,x2,y2
I made some test with different value but the error value is always here
Have you got any idea about it?
thank
delphine
07-04-2007 02:55 AM
For the function you have asked there is not a corresponding function in ExcelRpt library, but I suppose x1, y1 and x2, y2 are start and end point coordinates of the line you want to add. Here, "line" is a drawing object, like the ones you draw with a pencil ![]()
Are you sure this is what you want/need?
note: Generally speaking, I strongly recommend you using the ExcelRpt library, if it has what you need.
ExcelRpt is pretty satisfactory in terms of completeness, it is much easier to use and best of all it is documented.
Its function panels have built-in help.