|
-
Jan 8th, 2009, 03:41 AM
#1
Thread Starter
New Member
[2008] Get data out of Excel
I have an Excel document with customerinformation (their name, amount, vatnumber).
I need to put these in an Xml document. But I'm not sure if I can do this with Vb.net, cause I need the data line by line.
-
Jan 8th, 2009, 04:39 AM
#2
Re: [2008] Get data out of Excel
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 8th, 2009, 08:26 AM
#3
Re: [2008] Get data out of Excel
You can also use ADO.Net to load the data in your Excel file into a DataSet/DataTable from which you can call the WriteXml method to write it to an xml file.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
- Abraham Lincoln -
-
Jan 8th, 2009, 09:39 AM
#4
Thread Starter
New Member
Re: [2008] Get data out of Excel
 Originally Posted by stanav
You can also use ADO.Net to load the data in your Excel file into a DataSet/DataTable from which you can call the WriteXml method to write it to an xml file.
Is it with ado.net also possible to get the data line by line(from the excel)?
-
Jan 8th, 2009, 09:48 AM
#5
Re: [2008] Get data out of Excel
 Originally Posted by Tinkerbeline
Is it with ado.net also possible to get the data line by line(from the excel)?
You can pull just the data you need by specify your critiaria in the Select statement. Once you have the data loaded in a DataTable, you can get to any datarows anyway you want...
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
- Abraham Lincoln -
-
Jan 9th, 2009, 02:44 AM
#6
Re: [2008] Get data out of Excel
Using ADO.NET is faster but its also limited to what you can do with a workbook/sheet.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 9th, 2009, 04:35 AM
#7
Thread Starter
New Member
Re: [2008] Get data out of Excel
 Originally Posted by RobDog888
Using ADO.NET is faster but its also limited to what you can do with a workbook/sheet.
I just need data line by line.. Dont change the data or anything just put them in the right place in my xml code. I dont need to do anything more.
-
Jan 9th, 2009, 05:10 AM
#8
Re: [2008] Get data out of Excel
Then using ADO.NET is what you want to use.
Check here for the proper connectionstring - http://www.connectionstrings.com
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|