|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 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: Show quoteHide quote > 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 On Thu, 2 Nov 2006 00:29:45 -0500, "TCook" <getmyemai***@yahoo.com> 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) 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 Show quoteHide quote "Paul Clement" <UseAdddressAtEndofMess***@swspectrum.com> wrote in message news:5i1kk2dep2fkqpiqp0kd76o3om9f94c6qk@4ax.com... > On Thu, 2 Nov 2006 00:29:45 -0500, "TCook" <getmyemai***@yahoo.com> 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) Hi TCook,
> For example, using a range object, one can dump the data to an array. Is Not a .NET datatable, no. Excel (like most "traditional" Office apps) is > there a way to do something similar with a range object and a datatable? > 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 :-)
tootip or microhelp for menu items
Problems with references How to set OpenFileDialog to "My Computer" DataGridView Row NULL dates show today's date rather than a blank or NULL on form NewBie Problems when try to launch word in server 2003 Delete files/directories through VB Net beginning vb Scoping Issues |
|||||||||||||||||||||||