Results 1 to 4 of 4

Thread: Automate export of Excel file to XML file

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    2

    Automate export of Excel file to XML file

    Hi all,
    I have about 200 xlsx files that are exportable to XML.
    So I want to automate the process of export (not conversion but export).

    Here is a pseudo code :

    Code:
    For each xlsx file
    begin
    	open file with Excel
    	go to developper tab
    	export to XML
    	set xmlFilename
    	save xmlFilename
    end
    How can I do that ?

    Thanks in advance

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,339

    Re: Automate export of Excel file to XML file

    Hi, aminedz. Welcome to the forum.

    To get a list if your xlsx files in a directory: https://devblogs.microsoft.com/scrip...ts-subfolders/. To open a workbook: https://docs.microsoft.com/en-us/off...workbooks.open. To save a workbook: https://docs.microsoft.com/en-us/off...orkbook.saveas. To find the right value to use with the SaveAs method: https://docs.microsoft.com/en-us/off...l.xlfileformat.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2021
    Posts
    2

    Re: Automate export of Excel file to XML file

    Hi Peter, Thanks for your reply.
    Thanks also for the tips you gave me, but actually, there's a problem on how to export to xml.

    Here is an example of an xlsx file that can be exported to XML.

    The question is : how to implement, with the "export" feature on the Developer Tab in Excel.

    The export feature is not a SaveAs method.

    Thanks in advance Peter.

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,339

    Re: Automate export of Excel file to XML file

    I am sorry, I misunderstood your question. Does https://docs.microsoft.com/en-us/off...lmap.exportxml help?

    Oh, and this doesn't appear to be a vbscript question. I believe you need this forum: https://www.vbforums.com/forumdispla...ce-Development.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width