+ Reply to Thread
Results 1 to 5 of 5

convert - format xml to excel vba

  1. #1
    Registered User
    Join Date
    12-01-2014
    Location
    DubaI
    MS-Off Ver
    MS 7
    Posts
    10

    convert - format xml to excel vba

    Hello
    I have enherited from a file created by another person, the file is supposed to upload XML data fields into an Excel file, format them in a specific way and place each value according to the XML.
    the problem is that when a value in the XML is null, instead of showing no data on the corresponding cell in the Excel file, it takes the next value of the same field name and overrides it, which causes misalignment of data, shifting up those cells values to fill the blank cells instead of maintaining them empty.
    I have attached the file with samples.
    table 1 is what is supposed to happen, table 2 is what is happening.
    would appreciate your support on finding the error in the code.
    Thanks
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    869

    Re: convert - format xml to excel vba

    Can you attach a sample XML file that causes the problem? I believe the reason is straightforward but the solution may be complex given how the code is currently structured; it may need re-writing.

    WBD
    Excel 2016 on Windows 10, looking for rep!

  3. #3
    Registered User
    Join Date
    12-01-2014
    Location
    DubaI
    MS-Off Ver
    MS 7
    Posts
    10

    Re: convert - format xml to excel vba

    Thanks WideBoyDixon, attached.
    As I could not amend the file to de-identify the data, i only have one line of info. hope this can work to fix the macro.
    I also changed the extension of the file as it was giving me an upload error on this forum (due to file format)
    Looking forward to your help
    Rgds
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    869

    Re: convert - format xml to excel vba

    Try this:

    Please Login or Register  to view this content.
    WBD

  5. #5
    Registered User
    Join Date
    12-01-2014
    Location
    DubaI
    MS-Off Ver
    MS 7
    Posts
    10

    Re: convert - format xml to excel vba

    Thanks a lot, worked like a charm...
    Appreciated

+ 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. Convert Excel to DXF format
    By pike in forum Excel General
    Replies: 3
    Last Post: 06-12-2016, 10:32 PM
  2. Excel: How to convert time format into number format that can be added?
    By Frances Jones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2012, 04:10 PM
  3. Replies: 4
    Last Post: 06-03-2011, 01:48 PM
  4. Excel date format convert to string format
    By man in forum Excel General
    Replies: 1
    Last Post: 08-17-2006, 05:05 AM
  5. [SOLVED] how do i convert excel to csv format
    By baxterr in forum Excel General
    Replies: 1
    Last Post: 11-02-2005, 07:35 PM
  6. how do i convert excel to csv format
    By baxterr in forum Excel General
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM
  7. Replies: 2
    Last Post: 07-06-2005, 02:05 PM
  8. [SOLVED] convert .123 format to Excel?
    By Doug Rainville in forum Excel General
    Replies: 5
    Last Post: 01-28-2005, 06:06 PM

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