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!

retreive value from excel to VB through XSL

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,

i'm trying to get the value stored in an excel file, let's say cell (2,4), and use it in my VB program (i would like to get the result in my processor.output). this is the XSL :



<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;)
var xlWB = xlApp.Workbooks.open(&quot;C:/jay/perso/vbtests/example3/testExcel&quot;)
var xlWS = xlWB.ActiveSheet

function cell(row,col)
{
*** this returns the message 'the parameter is incorrect' :

return xlWS.Cells(2,4)
}

</msxsl:script>

<xsl:template match=&quot;/&quot;>
<NAC file=&quot;{$excelFile}&quot;>
<AccessHolder><xsl:copy-of select=&quot;xl:cell(2,4)&quot;/></AccessHolder>
</NAC>
</xsl:template>

</xsl:transform>

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

Part and Inventory Search

Sponsor

Back
Top