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.
Printable View
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.
Welcome to the Forums.
Yes you can do it several ways.
My Office FAQ - http://www.vbforums.com/showthread.php?t=358585
and
http://www.vbforums.com/showpost.php...38&postcount=3
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)?Quote:
Originally Posted by stanav
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...Quote:
Originally Posted by Tinkerbeline
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.Quote:
Originally Posted by RobDog888
Then using ADO.NET is what you want to use.
Check here for the proper connectionstring - http://www.connectionstrings.com