abooysen2
asked on
Convert Excel to XML
Hi
It will be my first time but I need to upload a Excel sheet and convert it to a XML is SSIS. Is there some references
It will be my first time but I need to upload a Excel sheet and convert it to a XML is SSIS. Is there some references
ASKER
The requirement is I have to do it in SSIS
If you have a well formatted xls document then there is no reason to convert it to xml all you need to do is import the xls document into ssis.
ASKER
Well users will drop it on a share and I SSIS package will need to pick up the Excel sheet that the users dropped.
If you have excel, open the file and save it as in xml format and upload it, everything should work.
ASKER
Can I not upload the Excel and then convert it to XML. Because I already propose that and they want to save it to a excel file
ASKER
I tried this VB code but it does not work
Dim dt As New DataTable()
Dim ds As New DataSet
dt.Columns.Add("Currency", String.Empty.GetType())
dt.Columns.Add("Legal Entity", String.Empty.GetType())
dt.Columns.Add("Account id", String.Empty.GetType())
dt.Columns.Add("Movement", String.Empty.GetType())
dt.Columns.Add("Value date", String.Empty.GetType())
dt.Columns.Add("Narration" , String.Empty.GetType())
dt.Columns.Add("Counterpar ty", String.Empty.GetType())
ds.Tables.Add(dt)
Dim FILE_NAME As String = "C:\Users\anthonio.booysen \xmltest.x ml"
Dim objWriter As New System.IO.StreamWriter(FIL E_NAME)
objWriter.Write(ds.GetXml)
objWriter.Close()
Dim dt As New DataTable()
Dim ds As New DataSet
dt.Columns.Add("Currency",
dt.Columns.Add("Legal Entity", String.Empty.GetType())
dt.Columns.Add("Account id", String.Empty.GetType())
dt.Columns.Add("Movement",
dt.Columns.Add("Value date", String.Empty.GetType())
dt.Columns.Add("Narration"
dt.Columns.Add("Counterpar
ds.Tables.Add(dt)
Dim FILE_NAME As String = "C:\Users\anthonio.booysen
Dim objWriter As New System.IO.StreamWriter(FIL
objWriter.Write(ds.GetXml)
objWriter.Close()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I manage to get this to work. Took a long time but it works
ASKER
I manage to get this to work. Took a long time but it works
http://www.softinterface.com/DL/DL_UserData_Proc.ASP