Closed Thread
Results 1 to 7 of 7

Convert one excel spreadsheet into multiple XML files

  1. #1
    Registered User
    Join Date
    12-15-2016
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    3

    Convert one excel spreadsheet into multiple XML files

    Hi guys,

    I attached example of my spreadsheet - source file have thousands of lines.
    Each excel line should be a XML file
    Rows in lines are values for XML structure
    Is possible (and how) to create multiple XML files from this spreadsheet by VBA ?
    XML file should be save as a value from storage cell
    Thanks in advance ...

    XML structure.JPG
    Attached Images Attached Images

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Convert one excel spreadsheet into multiple XML files

    WE can write out that XML using rows as values.

    1) Please upload your workbook with 2-3 lines of sample row data. Be sure to demonstrate all the hurdles that must be overcome due to variations in the row values.
    2) Please upload the matching XML files that are the results of those sample rows above. This will give us an exact test so we know when the macro is doing the right thing.

    3) Where are the filenames stored for each row?
    4) Where are the XML files to be written out to?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-15-2016
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    3

    Re: Convert one excel spreadsheet into multiple XML files

    JBeaucaire thank you for your help .
    I attach sample data files - excel sheet and the resulting xml file.
    Files are stored and processed on my local drive c:\files\XLS c:\files\XML
    After the processing phase it will be manually loading to system

    example.xlsx
    example1xml.zip

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Convert one excel spreadsheet into multiple XML files

    What would the three XML files created from the example.xlsx file be named?

  5. #5
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: Convert one excel spreadsheet into multiple XML files

    Maybe this can help?

    Will see if JBeaucaire can help. Interested to see the solution, as is my first time when i hear about a topic like that.
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Convert one excel spreadsheet into multiple XML files

    This macro will create an XML folder and drop the files in there naming them for the agent names. You can play with the FNAME part to get the filenames the way you want.
    Attached Files Attached Files
    Last edited by JBeaucaire; 12-17-2016 at 04:52 AM.

  7. #7
    Registered User
    Join Date
    12-15-2016
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    3

    Re: Convert one excel spreadsheet into multiple XML files

    JBeaucaire the Great :-)

    Thank you for your help - you saved me a lot of effort. It works exactly like it should.
    You are genius

    Regards,
    Greg

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Convert Multiple text files to excel files
    By shanmugapriya.a in forum Excel General
    Replies: 3
    Last Post: 07-07-2015, 10:39 AM
  2. Convert multiple text files to be excel files
    By PStump in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2014, 05:44 PM
  3. Convert multiple word files to one excel table
    By Barefaced in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2014, 04:52 AM
  4. [SOLVED] Convert Excel Spreadsheet to TXT files or compatible for Evernote
    By monomaniacpat in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-18-2014, 07:13 PM
  5. How to convert multiple excel files from a given location to PDF and send by email
    By Mdelgado in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2013, 05:10 PM
  6. [SOLVED] Help! How to import multiple .txt files into a single excel spreadsheet
    By blu37ay713 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2011, 06:50 AM
  7. MS Excel Multiple Files into Spreadsheet
    By jaym911 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2011, 09:08 PM

Tags for this Thread

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