+ Reply to Thread
Results 1 to 11 of 11

Export xml macro

  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Export xml macro

    Hello

    I need macro code for export xml data
    my excel already mapped xml

    export can be manually in this steps
    1 - select B2
    2 - right click
    3 - xml
    4- export
    5.png

    i want code to do this with one click,so what the code?

    kindly add the code in this button

    Please Login or Register  to view this content.
    Last edited by AliGW; 07-17-2019 at 10:52 AM. Reason: Improved for legibility.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Export xml macro

    Have you tried using "Record Macro? .. I think this may help you
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Export xml macro

    yes i tried, not working its only select the cell
    Last edited by AliGW; 07-17-2019 at 10:52 AM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Export xml macro

    So if you have cells already mapped to xmlmaps. Then code would be something like...
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  5. #5
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Export xml macro

    Unfortunately not working

    also ur code seems its will export the file direct, i need to choose location from the window not in code , so code should press export and stop here
    Attachment 632785
    Last edited by AliGW; 07-17-2019 at 10:53 AM. Reason: Please don't quote unnecessarily!

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Export xml macro

    ...i need to choose location from the window not in code
    This was not indicated in initial post.

    This will do the job then.
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,640

    Re: Export xml macro

    Expand on "not working".

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Export xml macro

    Quote Originally Posted by CK76 View Post
    This was not indicated in initial post.

    This will do the job then.
    Please Login or Register  to view this content.
    Thanks alot, working fine

    but is there any code to avoid error ?
    if i click save its oky working , but if i click cancel there is error

    Attachment 632792
    Attachment 632793

    i think there is code but i forget it

    if error ......

    thanks bro

  9. #9
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    Re: Export xml macro

    Thanks and sorry , i was think if i quote the messages, the second person will be noticed, noted thx
    Last edited by AliGW; 07-17-2019 at 11:39 AM. Reason: Please don't quote unnecessarily!

  10. #10
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Export xml macro

    Then separate out Application.GetSaveAsFileName from code line and perform check.

    Something like...
    Please Login or Register  to view this content.

  11. #11
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Export xml macro

    @ e97h

    Thanks for the rep.
    If your issue is resolved, please mark the thread as solved by using thread tools found at top of your initial post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to export tab
    By aaron061883 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-18-2017, 02:06 PM
  2. Replies: 1
    Last Post: 09-05-2017, 01:49 PM
  3. Macro to export and import a module and assigning different macro automatically
    By Libster78 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-14-2015, 06:31 PM
  4. Macro to Export a Sheet but also export a macro?
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 12:26 PM
  5. I would need a macro to export data from base example workbook to export worbook
    By slato8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 11:21 AM
  6. Help with an export macro
    By iisjman07 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2011, 01:35 PM
  7. export as vba macro
    By sali in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2006, 09:45 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1