Results 1 to 8 of 8

Thread: Convert selected file to XML and save.

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    24
    Rep Power
    0

    Convert selected file to XML and save.

    LOC generator.xlsm

    Hi Team,

    I am given a task to develop a macro similar to attached file. Basically what I need to do is, when a raw data file in excel format is uploaded to excel and then it should get converted to a xml file . This need to be developed using a macro.

    I want to set-up a button similar in the attached sheet which on pressing asks for the input file and then output file name, on pressing submit it generates the xml file.

    I know the basic concept of creating a macro but I dint understand how the activities behind the button is performed. I am not aware of VBA coding, so if I can achieve everything with the normal Excel options. Please explain so that I can try the same.

    Thanks in advance

    Regards
    Dhivya

  2. #2
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0
    Hi Divya,

    As per your requirement above we can able to help you.

    If you are interested we can provide you the training on the VBA\Macro so that you can able to do by your own.

    Kindly let me know if you are interested to learn?

    Thanks,
    Rosy

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    24
    Rep Power
    0
    Hi Rosy,

    Thanks , but when the trainign will be scheduled, its quite urgent deliverbale thats why i sought some ideas from people in the forum

  4. #4
    Junior Member
    Join Date
    Oct 2013
    Posts
    24
    Rep Power
    0

    Macro to fetch the xml file

    Hi Team,

    I developed a macro wherein you need to enter the required values for the columns and then on pressing the button the macro will run and generate a xml file.

    The issue I face is when I press the button and xml file is generated and saved in the desktop, again on changing the data and running the macro error appears as below screen shot. This is because that when the output xml file is available in the desktop and trying to regenerate the output file, it generates with the same name in that case the error appears. But this should not be the case it should update or replace the xml file generated.

    Also one more issues is whenever the xml file is getting stored it always look for my desktop location, my desktop location is hard coded in this. Not sure how to make this a generic one so that it will work in others pc too.


    Please advise.



    Capture1.jpg

    Regards
    Dhivya
    Last edited by dhivya.enjoy; 10-04-2013 at 07:02 PM.

  5. #5
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    12
    Please post the macro you created so we can see for ourselves how we can help you with your issues.

  6. #6
    Junior Member
    Join Date
    Oct 2013
    Posts
    24
    Rep Power
    0

    With Macro attachment

    Hi Bakerman,

    Please find the attached macro. You need to create a folder names xml_Extract in c: to see the output xml file.

    Output file will be of name output.xml.

    Please advise on my issues

    Thanks in advance
    Regards
    Dhivya
    Attached Files Attached Files

  7. #7
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    12
    Generic Desktop-path
    Code:
        With CreateObject("WScript.Shell")
            SpecialFolderPath = .SpecialFolders("Desktop")
        End With
    If you make only 1 file each day, you could add a date to the filename so it's unique name every day.

  8. #8
    Junior Member
    Join Date
    Oct 2013
    Posts
    24
    Rep Power
    0
    Thank you so much..I will try this option.

Similar Threads

  1. Replies: 4
    Last Post: 06-20-2013, 04:25 PM
  2. Save Worksheets As New File To Specific Folder
    By k0st4din in forum Excel Help
    Replies: 18
    Last Post: 06-08-2013, 04:24 PM
  3. Replies: 1
    Last Post: 03-07-2013, 11:42 AM
  4. Replies: 12
    Last Post: 08-19-2012, 06:17 PM
  5. Save File In CSV Format VBA
    By Raj Kumar in forum Excel Help
    Replies: 3
    Last Post: 06-01-2011, 07:22 AM

Posting Permissions

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