Re: ADODB.Recordset from workbooks : numbers only?
- From: "NickHK" <TungCheWah@xxxxxxxxxxx>
- Date: Tue, 15 Aug 2006 10:49:26 +0800
ADO is basically treating you Excel sheet as a table in a database. As such
, formula and cell references have no meaning, only the result in each cell.
..PasteSpecial is member of the Excel library, not ADO. To use it, you have
to get your out of ADO and into Excel first.
"JVLin" <JVLin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
I've only just started playing about with ADODB.Recordsets, specifically
import data from other workbooks.formulae
I notice though that queries don't return data if the cells contain
or cell references. Similarly, none of the 'PasteSpecial' functionalityseems
available. Is this to do with any of the settings I'm using (see last twothe
lines of the sample code below in particular) or is this a restriction of
' Create the connection string
stConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & stFullName & ";" & _
"Extended Properties=""Excel 8.0;HDR=No"";"
stSQL = "SELECT * FROM & [DataSheet$A1:E20]"
Set rsData = New ADODB.Recordset
rsData.Open stSQ, stConnect, adOpenForwardOnly, adLockReadOnly,
- Prev by Date: Ned Help with Print Macro
- Next by Date: Re: Macro to prevent adding sheet in a workbook.
- Previous by thread: Ned Help with Print Macro
- Next by thread: checking cell format