Hack Forums
[.NET] Filling Excel sheet with data from xml file - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Filling Excel sheet with data from xml file (/showthread.php?tid=5803536)



Filling Excel sheet with data from xml file - zna213 - Feb 23, 2018

Hello guys

I have the following problem. I have an Excel sheet which has to be filled in with data from an big XML file.
At first I read in the xml file with the following code.

Code
Sub openxXML()

Dim xml As Workbook
Dim varxml As Variant

varxml = Application.GetOpenFilename("All Files(*.*), *.*,XML-Files (*.xml),*xml*", 2, "Choose XML-File", _
"choose", False)

If varxml = False Then
    MsgBox "No Data selected"
    End If
    
End Sub


But now I don't now how I can fill in my excel file, is there anybody who can give some tips or input where I can watch some tutorials or read something.

Thank u


RE: Filling Excel sheet with data from xml file - flAmingw0rm - Feb 23, 2018

Use a library like this one to create your XLS file: https://github.com/JanKallman/EPPlus


RE: Filling Excel sheet with data from xml file - maype - Feb 23, 2018

Or you can simple using available library for Office excel.

See link: http://www.c-sharpcorner.com/UploadFile/bd6c67/how-to-create-excel-file-using-C-Sharp/

Basically you need to feed cells of the sheet. Its pretty sefl explanatory. Hope you succes.


RE: Filling Excel sheet with data from xml file - RiperFish - Feb 24, 2018

check this list :
https://www.youtube.com/watch?v=IExTaxXN2nk&list=PLdnPqkBptCELcojxTqOemyXlcA5vRollM