Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default How to Transfer an Excel Range to an ADO.Net DataSet or DataTable in VB.Net?

Hey All,

I've seen lots of stuff regarding pumping data into Excel from .Net but
haven't found anything for the reverse.

Does anyone have a snippet, article ID, etc. demonstrating how to take a
range object and pump that data into an ADO.Net DataSet?

Thanks,

TC


  #2   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Transfer an Excel Range to an ADO.Net DataSet or DataTable in VB.Net?

You handle this the same way you handle other data sources. First get
your connection string from www.connectionstrings.com and then proceed
to use ADO.NET to connect and read from the excel file.

Thanks,

Seth Rowe


TCook wrote:
Hey All,

I've seen lots of stuff regarding pumping data into Excel from .Net but
haven't found anything for the reverse.

Does anyone have a snippet, article ID, etc. demonstrating how to take a
range object and pump that data into an ADO.Net DataSet?

Thanks,

TC


  #3   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to Transfer an Excel Range to an ADO.Net DataSet or DataTable in VB.Net?

On Thu, 2 Nov 2006 00:29:45 -0500, "TCook" wrote:

¤ Hey All,
¤
¤ I've seen lots of stuff regarding pumping data into Excel from .Net but
¤ haven't found anything for the reverse.
¤
¤ Does anyone have a snippet, article ID, etc. demonstrating how to take a
¤ range object and pump that data into an ADO.Net DataSet?

See the following MS KB article:

How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET
http://support.microsoft.com/kb/316934


Paul
~~~~
Microsoft MVP (Visual Basic)
  #4   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default How to Transfer an Excel Range to an ADO.Net DataSet or DataTable in VB.Net?

Hey Guys,

I don't think that I was quite clear.

Using a range object, is there a quick way to blast the data into a
datatable?

For example, using a range object, one can dump the data to an array. Is
there a way to do something similar with a range object and a datatable?

Is there a quick way to dump the data from an array into a datatable?

I won't be using connection strings, etc. I will be using range objects.

Thanks & Regards,

TC


"Paul Clement" wrote in message
...
On Thu, 2 Nov 2006 00:29:45 -0500, "TCook" wrote:

¤ Hey All,
¤
¤ I've seen lots of stuff regarding pumping data into Excel from .Net but
¤ haven't found anything for the reverse.
¤
¤ Does anyone have a snippet, article ID, etc. demonstrating how to take a
¤ range object and pump that data into an ADO.Net DataSet?

See the following MS KB article:

How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook
With Visual Basic .NET
http://support.microsoft.com/kb/316934


Paul
~~~~
Microsoft MVP (Visual Basic)



  #5   Report Post  
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default How to Transfer an Excel Range to an ADO.Net DataSet or DataTable in VB.Net?

Hi TCook,

For example, using a range object, one can dump the data to an array. Is
there a way to do something similar with a range object and a datatable?

Not a .NET datatable, no. Excel (like most "traditional" Office apps) is
blissfully ignorent of all things .NET. Putting the range data into an
array, then that into the data table is probably your fastest choice if you
can't use a connection.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



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
assign dataset to matching dataset Michael Dirksen Excel Programming 0 June 16th 06 04:34 PM
Converting A Quarterly Dataset to Weekly Dataset Dan Thompson Excel Programming 5 November 25th 05 09:27 PM
Load a range of cells into a dataset with an opened workbook instance. [email protected] Excel Programming 0 May 31st 05 04:32 PM
Excel range into a vb.net dataset.... Mac Excel Programming 0 April 27th 05 11:29 PM
Excel into DataTable using OleDbDataAdapter Matthew_H Excel Programming 1 March 4th 05 08:25 AM


All times are GMT +1. The time now is 03:09 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"