0

I need to import XML files to Excel book, but got one issue: Excel convert some number values to date. It happens when numbers are separated with dot or hyphen. The "dot problem" is solved (i changed system separator to comma), but hyphen still makes trouble.

Example: XML file code:

<?xml version="1.0" encoding="UTF-8"?>
<Order>
    <Head>
        <OrderCode>ZWA00013819</OrderCode>
        <DateOfShipment>20181231</DateOfShipment>
        <OrderType>LA </OrderType>
    </Head>
    <Detail>
        <Article>5526-02</Article>
        <QuantityPC>30</QuantityPC>
        <PackType>ut</PackType>
        <DateExpiry>26.12.2019</DateExpiry>
    </Detail>
</Order>

Import result screenshot

first row - standard import, second - import to row in text format. In both cases excel convert it to date, but i need to keep the number ("5526-02") instead. Could someone please help with this problem? I need to find the way to keep values in the same format as they shown in xml file, desirable without modifying original file.

  • Using the Data -> Import path, you should be able to specify the format of your column by clicking edit on the bottom of the import wizard, right click the column header to change the column data type (try Text). – TEEKAY Dec 28 '18 at 13:39
0

You can change the column datatype on import before finalizing the load.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

  • If you're pleased with the solution please consider marking it answered so I can get those nerdpoints :) – TEEKAY Dec 28 '18 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.