ChrisBurch
IS-IT--Management
Hi All,
I am currently writing a progress query that generates a .csv file, and then opens it with Excel. So far so good, it's working
What I now need to do is open another Excel workbook (first one still open), and run a macro from the just opened workbook.
Can someone advise how to get the second workbook open, and trigger a macro.
PROCEDURE MY-EXCEL:
DEF VAR chexcel AS COM-HANDLE NO-UNDO.
CREATE 'excel.application' chExcel.
def var test as char.
chexcel:VISIBLE = TRUE.
chExcel:workbookspentext(
'C:\TEMP\Completed jobs.csv',
, /* origin */
, /* startrow */
1, /* datatype */
, /* textqualifier */
false, /* consecutivedelimiter */
false, /* tab */
FALSE, /* semicolon */
TRUE, /* comma */
false, /* space */
FALSE, /* other */
, /* otherchar */
/* fieldinfo */
)
.
RELEASE OBJECT chexcel.
END PROCEDURE.
Thanks,
Chris
It worked yesterday.
It doesn't work today.
That's Windows!
I am currently writing a progress query that generates a .csv file, and then opens it with Excel. So far so good, it's working
What I now need to do is open another Excel workbook (first one still open), and run a macro from the just opened workbook.
Can someone advise how to get the second workbook open, and trigger a macro.
PROCEDURE MY-EXCEL:
DEF VAR chexcel AS COM-HANDLE NO-UNDO.
CREATE 'excel.application' chExcel.
def var test as char.
chexcel:VISIBLE = TRUE.
chExcel:workbookspentext(
'C:\TEMP\Completed jobs.csv',
, /* origin */
, /* startrow */
1, /* datatype */
, /* textqualifier */
false, /* consecutivedelimiter */
false, /* tab */
FALSE, /* semicolon */
TRUE, /* comma */
false, /* space */
FALSE, /* other */
, /* otherchar */
/* fieldinfo */
)
.
RELEASE OBJECT chexcel.
END PROCEDURE.
Thanks,
Chris
It worked yesterday.
It doesn't work today.
That's Windows!