Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameters and scripting

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,

i'm having a problem with parameters and scripting.
i get my parameter (excelFile) from my VB program,
and it works fine when i use it inside the xsl.
but i can't figure how to use it in the scripting
part. What is the correct syntax oi should use ?

this is my code :


<?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?>
<xsl:transform
xmlns:xsl=&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot;
xmlns:xl=&quot;urn:MyExcelFunctions&quot;
version=&quot;1.0&quot;>

<xsl:param name=&quot;excelFile&quot;/>

<msxsl:script language=&quot;JScript&quot; implements-prefix=&quot;xl&quot;>
var xlApp = new ActiveXObject(&quot;Excel.Application&quot;)

// used here, it doesn't work :
var xlWB = xlApp.Workbooks.open(??? $excelFile ???)

var xlWS = xlWB.ActiveSheet

function getCell(idCell)
{
return xlWS.Range(idCell).Text;
}

</msxsl:script>

<xsl:template match=&quot;/&quot;>

//used here, it works fine :
<NominationAnnualCapacity file=&quot;{$excelFile}&quot;>

...

</NominationAnnualCapacity>

</xsl:template>
</xsl:transform>


thanx a lot for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top