Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Process data in a sheet within workbook using SQL query?
I asked this a while back, never really got it pinned down, thought I'd try again.
I'd like to query a sheet in a workbook - example... Set rs = SomeFunction("SELECT TOP 5 Sales FROM Sheet1") While Not rs.EOF 'Do something with rs rs.MoveNext Wend Obviously this is in VBA - thats fine. If this can be done (even if pivot tables have to be used) please help. Cheers. PS: I could, as an alternative, go straight to SQL Server for data, but there are no DSNs set-up on users PCs (nor will there be). Is it possible to do my queries directly to SQL Server without a DSN (i.e. using a connection string)? example... sConnectionString = "Data Source=server1;Initial Catalog=myDatabaseName;Integrated Security=SSPI" Set rs = SomeOtherFunction("SELECT TOP 5 Sales FROM SalesTable", sConnectionString) While Not rs.EOF 'Do something with rs rs.MoveNext Wend |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Process data in a sheet within workbook using SQL query?
"Stevie_mac" wrote ...
Is it possible to do my queries directly to SQL Server without a DSN (i.e. using a connection string)? You can use ADO with a DSN-less connection string e.g. using OLE DB provider: http://www.able-consulting.com/MDAC/...erForSQLServer Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Query data from same workbook | Charts and Charting in Excel | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Free Data Process/Query Tool | New Users to Excel | |||
Free Data Process/Query Tool | Excel Discussion (Misc queries) |