October 14, 2010 at 10:09 am
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
October 14, 2010 at 10:36 am
Yes.
When specifying your filename name, just use .dat for the extension instead of .csv
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]
October 15, 2010 at 8:46 am
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.
October 15, 2010 at 8:50 am
I give up! It's not worth the trouble.
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]
October 15, 2010 at 9:04 am
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
October 15, 2010 at 9:17 am
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.
October 15, 2010 at 9:36 am
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