Using FSO to get Excel data
I hope there is an easy answer to this!
I have an active server page which dynamically shows all files in a directory. Based on the file name, using FSO, I use the first 5 chars to create a link to another tool and MID to gather other info from the title which helps populate other table cells. My question is this: Is there a way using VBScript to grab the value of a certain cell within the spreadsheet? Thanks in advance for any help!! Regards, Rusty |
Using FSO to get Excel data
Rusty
You can use ADO to query ranges in closed excel files without the need for excel to be installed on the server. sPath = "D:\TestDB.xls" Dim vTemp(4),i Set oCon = CreateObject("ADODB.Connection") Set oRst = CreateObject("ADODB.Recordset") oCon.Open _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Extended Properties=Excel 8.0;Data Source=" & sPath oRst.Open "SELECT * FROM [Sheet1$A1:A4]", oCon, 3 'do your stuff... If oRst.State Then oRst.Close If oCon.State Then oCon.Close Set oRst = Nothing Set oCon = Nothing Plenty to google on ADO in this group and elsewhere.. HTH -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam RustyR wrote : I hope there is an easy answer to this! I have an active server page which dynamically shows all files in a directory. Based on the file name, using FSO, I use the first 5 chars to create a link to another tool and MID to gather other info from the title which helps populate other table cells. My question is this: Is there a way using VBScript to grab the value of a certain cell within the spreadsheet? Thanks in advance for any help!! Regards, Rusty |
Using FSO to get Excel data
EXCELLENT! Thank you very much!
Rusty *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 05:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com