简体   繁体   中英

XML -> Excel Data Formatting

I shall start by listing my XML structure.

<root>
  <person>
    <birthday>
      03/24/1989
    </birthday>
    <money>
      $24.00
    </money>
  </person>
  <person>
    <birthday>
      03/24/1989
    </birthday>
    <money>
      $24.00
    </money>
  </person>
</root>

When I import this into excel, all the birthdays and money values are formatted as text. I want to be able to apply filters to my table, such as birthdays between x & y or money values less than $13.00. I can select a column and set the formatting, but it still doesn't enable the proper filter options.

Is there a way to make XML/Excel import data as anything other than text? If not, is there a way to easily format the text to the desired format?

If your XML file follows a particular and well-defined XSD (ie, birthday as date, and money as currency), I think that will automatically take care of the correct data import. I try opening an XML file that I have with Excel, and everything is as should be.

Other than that, formatting the columns seems to be the way to go. I'm not sure what you mean by easily formatting, so maybe it will help if you can clarify a little bit more.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM