Page 1 of 1

How to call excel macro

Posted: Tue Oct 07, 2008 10:44 pm
by rajendharreddy
Hi,

I have data in excel. I can convert the data into CSV format and read the data from DS Job. A macro is being called in the excel. When DS job runs, excel macro should execute along with the job on the data and write the data to output (text) file.

Can anybody let me know how to call an excel macro from a DS Job?

Thanks..

Posted: Tue Oct 07, 2008 10:46 pm
by chulett
Since your DataStage server is on Windows, why not just read the .xls file directly via ODBC?

Posted: Wed Oct 08, 2008 2:00 am
by rajendharreddy
Thanks for the suggession. I can read data from excel, but how to execute macro which is being called in excel.

Can anybody help me on this?

Thanks

Posted: Wed Oct 08, 2008 7:16 am
by chulett
Oh, I thought the macro wrote the speadsheet out as a csv so you could 'read' it. Unless someone can tell you how to run it, perhaps incorporate the macro's logic into the DataStage job?

Posted: Wed Oct 08, 2008 2:51 pm
by ray.wurlod
Can it be made an "auto run" macro that runs when the workbook is opened? Can you invoke a macro as if it were a stored procedure? Just ideas - no idea if they will work.