Exporting silverlight datagrid to excel file without warning message
The xls file opens fine and the data is correct but each time I open the file, the warning:
"The file you are trying to open, [filename] is开发者_运维技巧 in a different format... Verify that the file is not corrupted..."
pops up. I've read that there is no cleaner workaround to this except tweaking the registry/group policy to 'suppress' the message. But then, this doesn't appear on real xls files made from excel.
So is there a way/format that excel will open the file without this warning message? Should exporting the datagrid to xml/csv work?
found the answer same day, forgot to post the answer as soon as I got it working.
Here's a handy library to help create and read excel files properly. Works on SL4 but you could just tweak the source code to make it usable in SL3 http://excellite.codeplex.com/
精彩评论