Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

trouble loading in XML file

Hi all,

I have an XML file that i have no idea how to load in properly, could someone possibly help please?

i have attached a sample file (saved as xls) and i need to load in the data as it is (like a standard xls, with the columns being loaded in a field names)

any help would be great.

Thanks

10 Replies
mjayachandran
Creator II
Creator II

hi alfredo,

Just a suggestion, reading from xml can sometimes not be so easy. Thats why i always execute a vbs script to convert the xml to xls and then read from xls.

---------------------------------------------------

VBS

--------------------------------------------------

Vbscript to convert to xls :

Dim xlApp, xlWkb, SourceFolder,TargetFolder,file

Set xlApp = CreateObject("excel.application")

Set fs = CreateObject("Scripting.FileSystemObject")

file ="Sample.xml"

Const xlNormal=1

SourceFolder="C:\Users\mjayachandran\Desktop"

TargetFolder="C:\Users\mjayachandran\Desktop"

xlApp.Visible = false

  Set xlWkb = xlApp.Workbooks.Open(SourceFolder & "\" & file)

  BaseName= fs.getbasename(SourceFolder & "\" & file)

  FullTargetPath=TargetFolder & "\" & BaseName & ".xls"

  xlWkb.SaveAs FullTargetPath, xlNormal

  xlWkb.close

fs.DeleteFile("C:\Users\mjayachandran\Desktop\Sample.xml")

Set xlWkb = Nothing

Set xlApp = Nothing

Set fs = Nothing

------------------------------------------------------------------------------

after you read the xls file successfully. you can again execute a command to delete the generated xls file.