Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..,

I am converting grid view data to .xls format. I stored this csv file in "D://NAME.xls". But When I open the name.xls a Text Import dialog appears. My system has open office only.How can I avoid this screen??
Posted
Updated 13-Jan-15 0:29am
v2
Comments
Richard MacCutchan 13-Jan-15 6:25am    
You cannot store a CSV file with the .xls extension.

1 solution

You have two choices ...

Either store the file as D:\NAME.CSV (See the comment from Richard macCutchan)

Or

Save the data in XLS format - see this CP article for more information Export datatable to XLS/CSV compatible with MS-Office and Open-Office[^]
 
Share this answer
 
Comments
Member 10994712 13-Jan-15 6:46am    
am developing a windows application
CHill60 13-Jan-15 7:02am    
Then store it as a CSV - both MS Office and Open Office calc can open one of those
Member 10994712 13-Jan-15 23:33pm    
I created file as name.csv. But it is in word format
CHill60 14-Jan-15 5:52am    
If it is in word format then that is what your code wrote it out as! Name it .DOCX if it's word format

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900