In Excel-VBA .how to save a xml file in the existing sheet without saving it any drives -


please check below code... here dont want converted xml code save in drive, instead want put contents of converted file next sheet of existing excel.

sub generatexml() ' ' generatexml macro '  '     sheets("sheet2").select     activeworkbook.xmlmaps("result_map").export url:="d:\temp3.xml"     sheets.add after:=sheets(sheets.count)     activesheet.querytables.add(connection:="text;d:\temp3.xml", destination:=range("$a$1"))         .name = "temp3"         .fieldnames = true         .rownumbers = false         .filladjacentformulas = false         .preserveformatting = true         .refreshonfileopen = false         .refreshstyle = xlinsertdeletecells         .savepassword = false         .savedata = true         .adjustcolumnwidth = true         .refreshperiod = 0         .textfilepromptonrefresh = false         .textfileplatform = 1252         .textfilestartrow = 1         .textfileparsetype = xldelimited         .textfiletextqualifier = xltextqualifierdoublequote         .textfileconsecutivedelimiter = true         .textfiletabdelimiter = true         .textfilesemicolondelimiter = false         .textfilecommadelimiter = false         .textfilespacedelimiter = false         .textfilecolumndatatypes = array(2, 1)         .textfiletrailingminusnumbers = true         .refresh backgroundquery:=false     end   '  kill "c:\temp.xml" end sub 

instead of using xmlmaps.export method, msdn says following:

use exportxml method export contents of mapped cells string variable.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -