Friday, September 01, 2006

Yet another way of exporting to Excel file from HTML without Excel

Yes, many of solutions of exporting to Excel from HTML should using Excel.exe process, it's a perfect way to access Excel model but with a hard problem that handling the Excel.exe process at web server side. while some few ways without Excel is too simple, indeed, is XML format file.

There is yet another way to treat the data as Excel format without Excel now.

At HTML code:

<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- work sheet name -->
<x:ValidPrinterInfo />
<!-- data to export -->

At the server script code:

Response.ContentType = "application/"

That's all! as you see, the key of this way is using XSD to access the Excel model.

Hope helps.

PS: this blog written by Window Live Writer, and code height light by Steve Dunn's Code Formatter Plugin.

No comments: