Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving a line chart data point revises data table value in Excel ' Ed Smith Charts and Charting in Excel 2 November 16th 12 01:03 PM
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel Karin Excel Discussion (Misc queries) 2 September 22nd 09 05:31 PM
Email (LDAP) data download into a single Excel cell - data separat MSA Excel Worksheet Functions 1 March 4th 08 05:14 PM
excel 2007, how to select a data point and cycle through data points [email protected] Charts and Charting in Excel 5 September 4th 07 12:29 PM
Eliminating rows of data in excel spreadsheet that have blank cell in row A and data in row B - E Steven R. Berke Excel Programming 1 July 8th 03 11:22 PM


All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"