Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Need help to convert Excel data to XML

  1. #21
    Junior Member
    Join Date
    Feb 2021
    Posts
    12
    Rep Power
    0

    excel file

    Hi Alan,

    Please see the enclosed excel sheet, I tried with multiple date/text format and different machine. However, it's still giving "00:00" instead of actual time.
    Enclosing the text file as well.

    Thanks
    Attached Files Attached Files

  2. #22
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,446
    Rep Power
    10
    Hi

    Your file is different to the type you told me before. My macro was written to work on the file type you gave. ( You have an extra column in your latest file ). ( I am surprised you did not notice that? )

    The macro that I wrote works assuming specific headings, in particular those you gave me.

    This is the sort of test data you were talking to me about before ( https://excelfox.com/forum/showthrea...ll=1#post15351 )

    _____ Workbook: Sample excel file.xls ( Using Excel 2007 32 bit )
    Row\Col A B C D E
    1 Entity ID day month year time
    2 700 19 2 2021 08:00
    3 700 19 2 2021 08:30
    Worksheet: Sheet1

    The macro I wrote works on that and gives the results you asked for ( https://excelfox.com/forum/showthrea...ll=1#post15351 )
    ( You would have seen that if you had downloaded and tried the macro in the sample workbook I did for you ( https://excelfox.com/forum/showthrea...ll=1#post15365 ) )



    Your last uploaded workbook , xlFox1.xlsm , looks like this

    _____ Workbook: xlFox1.xlsm ( Using Excel 2007 32 bit )
    Row\Col A B C D E F G
    1 Entity ID day month year recID time
    2 700 19 2 2021 7001 8:00
    3 700 19 2 2021 7001 8:30
    Worksheet: Sheet1




    If I look back over the Thread we can see you have had a few different file formats, with different headings.

    Maybe you should check and make sure you know what you want., that is to say what headings you are going to have and what output you want.

    If you want a macro which will give you the results that you want for any different set of headings, then that probably can be done, but would be quite a long and complicated macro

    The macro I wrote was for the specific headings you gave to me in the test data
    Entity ID __ day __ month __ year __ time


    You have two options
    _ (i) A macro or macros, each for a specific set of headings
    or
    _ (ii) A more complicated single macro that will work on different headings

    In case (i) it is essential to know the headings, as obviously I can’t guess.
    In case (ii) it would still be helpful to know what might be typical headings


    If you just want a macro for your last file, then you might be able to figure out yourself the modifications that you need to do to my macro


    Alan
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  3. #23
    Banned
    Join Date
    Feb 2021
    Posts
    1
    Rep Power
    0
    Hi Uakash,

    If you're still in trouble please try to use this online free tool below Excel to XML converter.
    https://onlineconvertfree.com/conver...at/xls-to-xml/
    It's really great. And I hope this will work for you.

  4. #24
    Junior Member
    Join Date
    Feb 2021
    Posts
    12
    Rep Power
    0
    Thank you Alan for all your help and support, I did final testing on my data today and with just some edits it's working for me as I wanted.
    You're a champ. Thanks again and hope to connect with you soon.

  5. #25
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,446
    Rep Power
    10
    Thx for the feedback
    Alan
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Similar Threads

  1. Replies: 6
    Last Post: 09-24-2020, 10:36 AM
  2. XML Mapping in Excel Sheet
    By Ranjithkumar in forum Excel Help
    Replies: 1
    Last Post: 01-28-2014, 09:14 AM
  3. Xml Mapping in Excel Macro
    By dhivya.enjoy in forum Excel Help
    Replies: 1
    Last Post: 10-18-2013, 04:11 PM
  4. Convert selected file to XML and save.
    By dhivya.enjoy in forum Excel Help
    Replies: 7
    Last Post: 10-09-2013, 01:32 PM
  5. Replies: 0
    Last Post: 08-23-2012, 08:00 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
  •