I want to call an Excel-Makro in my Coldfusion-Template.
How do I do this ???I tried evrything to run it, but now way, it all didn't help.
Has anyone an idea, I'd be very thankful.
May I use the Run-method or may I use the Execute-methode and do I have to give them Parameters with and when yes, which ones?
here's the code I've tried to run:
<cfset DBPath="#request.RootPath#TestMappe2.xls">
<cfset sheetname="20001204">
<!--- set the parameter for the excel file connection --->
<cfset dsn="DRIVER={Microsoft Excel Driver (*.xls)};DBQ=#DBPath#;FIL=MSExcel">
<!--- try to connect to this com object --->
<cfobject type="COM" name="xls" class="ADODB.Connection" action="CREATE">
<cfscript>
objWorkBook = xls.Workbooks;
objOpenedBook = objWorkBook.Open(DBPATH);
objWorkSheets = xls.WorkSheets;
objAction = xls.execute("Run(['makro'],['chart'],['TheChart']"
objWorkBook.Close();
xls.Quit();
</cfscript>
How do I do this ???I tried evrything to run it, but now way, it all didn't help.
Has anyone an idea, I'd be very thankful.
May I use the Run-method or may I use the Execute-methode and do I have to give them Parameters with and when yes, which ones?
here's the code I've tried to run:
<cfset DBPath="#request.RootPath#TestMappe2.xls">
<cfset sheetname="20001204">
<!--- set the parameter for the excel file connection --->
<cfset dsn="DRIVER={Microsoft Excel Driver (*.xls)};DBQ=#DBPath#;FIL=MSExcel">
<!--- try to connect to this com object --->
<cfobject type="COM" name="xls" class="ADODB.Connection" action="CREATE">
<cfscript>
objWorkBook = xls.Workbooks;
objOpenedBook = objWorkBook.Open(DBPATH);
objWorkSheets = xls.WorkSheets;
objAction = xls.execute("Run(['makro'],['chart'],['TheChart']"
objWorkBook.Close();
xls.Quit();
</cfscript>