The author says: "The results you get depend on how your Web browser is set up to handle .XLS files. In some cases, it will render in the Web browser; in others, it will open Excel and load the file in there. This activity is determined by the local client machine settings for MIME types and is outside the control of a Web page."
However, in a several projects I've been successfully used a technique of writing a "Content-Disposition" HTTP header, which is, in my opininon is targeted exactly for that thing. The header should look like:
Content-Disposition: attachment; filename=file.xls
The result is a rising download/open window. I think it must work in any browser with any settings.
But the author of course right from the point of view that it is really hard to make XLS open inside browser. Moreover, it will never open inside any browser except IE.
Discussion on:
View:
Show:
We use SoftArtisans ExcelWriter. It is admittedly more expensive than the approach outlined in the article (I did not realize HTML tables could just be sent to Excel...!) but immensely powerful and fast. The Enterprise Edition even has .NET APIs and I hear the upcoming v5 will be native managed code. And it is browser-independent, even lets you create graphs etc. on the server side, no Excel required on the server, and much more... Nope, no affiliation with SoftArtisans, just like the product a lot!
Another option you have available is to use GenX.NET 3.0. (http://www.genxdotnet.com) It is a DTS engine for the .NET framework, and can generate Excel files from ADO.NET DataReaders and DataSets. You can output to the file system, browser, or e-mail intuitively, without large amounts of code.
.NET Barcode for Windows Forms is a powerful and flexible:http://www.keepautomation.com/products/net_barcode_winforms/
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































