gaurab
New Member
Hiee e'body .. i am trying to export tables of DB into Excel. And i am also been successful doing like this :
/**************************************************/
DEFINE VARIABLE hExcel AS COM-HANDLE.
DEFINE VARIABLE hws AS COM-HANDLE.
DEFINE VARIABLE hwb AS COM-HANDLE.
CREATE "Excel.Application" hExcel.
IF NOT VALID-HANDLE(hExcel) THEN RETURN.
hExcel:Visible = true .
hwb = hExcel:WorkBooks:ADD.
hws = hwb:worksheets:ADD .
RELEASE OBJECT hws.
RELEASE OBJECT hwb.
RELEASE OBJECT hExcel.
/****************************************************/
But my problem is i want to generate this excel file in a particular location i want with the name i give. I belive this could be done with small modifications on the code above but i am unable to do that.
Please help me out of this.
Regards,
Gaurab.
/**************************************************/
DEFINE VARIABLE hExcel AS COM-HANDLE.
DEFINE VARIABLE hws AS COM-HANDLE.
DEFINE VARIABLE hwb AS COM-HANDLE.
CREATE "Excel.Application" hExcel.
IF NOT VALID-HANDLE(hExcel) THEN RETURN.
hExcel:Visible = true .
hwb = hExcel:WorkBooks:ADD.
hws = hwb:worksheets:ADD .
RELEASE OBJECT hws.
RELEASE OBJECT hwb.
RELEASE OBJECT hExcel.
/****************************************************/
But my problem is i want to generate this excel file in a particular location i want with the name i give. I belive this could be done with small modifications on the code above but i am unable to do that.
Please help me out of this.
Regards,
Gaurab.