Import from Excel to .DAT file

  • Hi All,

    I have to import the data from excel to .dat file. But it is like I have to have the csv file but with .dat file extension. Is it possible?

    Thanks,

    Preensheen

  • Yes.

    When specifying your filename name, just use .dat for the extension instead of .csv



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Alvin Ramard (10/14/2010)


    Yes.

    When specifying your filename name, just use .dat for the extension instead of .csv

    I tried to do an example in a similar way, but when I was trying to open the .dat file in a excel all the columns come up into a single column and they are comma seprated.

  • I give up! It's not worth the trouble.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Excel wont auto-magically parse a .dat file, it will a .csv file becasue it knows about them. .Dat can have anything in it really so it would be very difficult to make it format to excel each time.

    you can format it manually by higlighting the column and clicking on the text to columns button

  • That is not related to the structure of the file; it is related to how your windows client is set up. Excel is set as the default application to open files that have a csv extension. It would do this regardless of whether the file was actaully comma delimited.

    In your case, you have a comma delimited file with a dat extension. Windows does not know what application to use to open it. If you would open it with notepad, you would see the comma delimited data. You need to tell windows to use Excel to open files with a dat extension if that is the behavior that you wish.

  • Ed Zann (10/15/2010)


    That is not related to the structure of the file; it is related to how your windows client is set up. Excel is set as the default application to open files that have a csv extension. It would do this regardless of whether the file was actaully comma delimited.

    In your case, you have a comma delimited file with a dat extension. Windows does not know what application to use to open it. If you would open it with notepad, you would see the comma delimited data. You need to tell windows to use Excel to open files with a dat extension if that is the behavior that you wish.

    Associating the file with excel does not make a difference with the behaviour when it is opened, it will still not automatically parse the .dat file into columns like .csv file.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply