0

Previously I am using excel file to genrate the .xml file manually by using export from an already open excel file and use the same file .xml file to genearte the file using msxsl.exe

like

msxsl.exe exported.xml file.xsl -o outputfile

Now I want to automate the genration of exported.xml file instead of doing it manually. Some one suggest me replace excel file with .csv file and it will reduce the effort. I am able to use csv file , but I dont know how to generate the exported.xml file from a csv file automatically as well from a excel file too.

Can anybody suggest me some quick way to do the same?

Thanks & Regards Vikas

VickyCool
  • 113
  • 1
  • 12

1 Answers1

0

So your data is in an Excel file, you've been exporting it as XML data and then transforming it using a stylesheet you created into a different XML format. And what you want is to automate the above.

Probably the easiest way is to write a vbscript that does both of the above steps. Here is how to save as CSV. To save as XML, use xlXMLSpreadsheet=46 instead of xlCSV=6. Then use Exec to call msxsl.exe, or use transformNode to apply the stylesheet directly.

Community
  • 1
  • 1
snips-n-snails
  • 637
  • 5
  • 22