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="1.0" encoding="iso-8859-1"?>
<xsl:transform
xmlns:xsl=" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:xl="urn:MyExcelFunctions"
version="1.0">
<xslaram name="excelFile"/>
<msxsl:script language="JScript" implements-prefix="xl">
var xlApp = new ActiveXObject("Excel.Application"
// 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="/">
//used here, it works fine :
<NominationAnnualCapacity file="{$excelFile}">
...
</NominationAnnualCapacity>
</xsl:template>
</xsl:transform>
thanx a lot for your help.
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="1.0" encoding="iso-8859-1"?>
<xsl:transform
xmlns:xsl=" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:xl="urn:MyExcelFunctions"
version="1.0">
<xslaram name="excelFile"/>
<msxsl:script language="JScript" implements-prefix="xl">
var xlApp = new ActiveXObject("Excel.Application"
// 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="/">
//used here, it works fine :
<NominationAnnualCapacity file="{$excelFile}">
...
</NominationAnnualCapacity>
</xsl:template>
</xsl:transform>
thanx a lot for your help.