Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Load a range of cells into a dataset with an opened workbook instance.

Hi,

I am kind of having to load a 'range' of cells into a dataset with an
instance of workbook that i have created. Is there a possibility that I
do it?

For eg.
Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
objWorkbook = objExcel.Workbooks.Open"C:foo.xls")
Dim objSheet1 As Excel.Worksheet = objWorkbook.Worksheets("Sheet1")
...
' Do some operations in the cells in the worksheet
...

Dim sConnectionString As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<THIS IS WHERE I WANT TO
GIVE A RANGENAME FROM objWorkBook;Extended Properties=Excel 8.0;"
...
load the data into dataset etc.
Dim objCmdSelect As New OleDbCommand("SELECT * FROM RangeName",
objConn)



Any ideas?

Thanks in advance,
Sriram

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
clear cells when workbook is opened Wanna Learn Excel Discussion (Misc queries) 6 May 15th 09 06:54 PM
Set up Excel to start new instance for each new file opened. Minimal_Subset Excel Discussion (Misc queries) 2 May 12th 05 01:36 AM
Excel range into a vb.net dataset.... Mac Excel Programming 0 April 27th 05 11:29 PM
How to see if the opened workbook is opened by another user ? balexis Excel Programming 1 August 18th 04 04:11 PM
Excel ADO connection opens read-only instance of opened Excel Serge L Excel Programming 6 September 23rd 03 07:39 PM


All times are GMT +1. The time now is 09:29 AM.

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

About Us

"It's about Microsoft Excel"