The official name: 2007 Microsoft® Office system

Finally, I am able to spell the real name for the next version of Office: 2007 Microsoft® Office system.

For those of you who have not seen the press passes and want to catch-up here is a list with some of them:

See the 2007 Microsoft Office System Pricing and the 2007 Microsoft Office System Packaging.

Maybe you have heard that this is the biggest release of the decade, and I can tell you that this version of Office has great potential as a development platform. Lots of features/enhancements were announced on Beta 1 and for Beta 2 there are more cool surprises waiting to be announced.

My latest experiment with 2007 Microsoft® Office 🙂 is exporting an ASP.NET 2.0 GridView to Excel 2007. If you use the following code snippet, you will be able to export the content of a SqlDataSource (used to DataBind a GridView) to Excel (without automation):

   protected void ExportToExcel() {
Response.Buffer = true;
Response.ContentType "application/";
Response.Charset "";
.EnableViewState = false;

System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);

GridView grid = new GridView();
grid.DataSource SqlDataSource1.Select(DataSourceSelectArguments.Empty);
grid.AutoGenerateColumns = true;


We built a Web based application for MSDN content management, and we export reports to Excel 2003 using the previous snippet of code. One thing that we don't like is that we lose all formatting, so we have the data, but then we have to make it pretty again.

I ran the same process on a machine where I have the last build of 2007 Microsoft® Office and Excel 2007 is smart enough to keep my formatting. Another cool enhancement. For those of you who have Beta 1, please give it a try.

Comments (10)

  1. PatriotB says:

    Well, not quite "Office 2007" — "2007 Microsoft Office System."  Whoever decided to put the 2007 first should get a stern talking-to.

  2. Hi All,

    I had to edit this blog entry to comply with the naming conventions. So here’s the thing:

    As a system, the real name is 2007 Microsoft® Office system.

    The suite product names are: Microsoft® Office <Edition> 2007. See the 2007 Microsoft Office System Packaging.

    Finally, each program can be called <Program> 2007.

    For more details see:

  3. Warrior says:

    This still doesnt work for me. It worked in Excel 97 but in Excel 2007 I keep getting the error

    The file you are trying to open, <filename>, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now? <Yes> <No> <help>

    The only difference in code is that – I was also doing

    Response.AddHeader("content-disposition", "attachment;filename=somename.xls");

  4. Stefan says:


    I an experiencing the same problem… It looks like Office 2007 issue (doesn’t seem to me to be fixed :-()

  5. Balaji says:

    Looks like this will not be fixed in the final release version.

  6. Mizuki says:

    Hi! The above codes will produce a prompt box asking me whether I would like to "Open", "Save As", or "Cancel", can you suggest how can I go about avoiding the propmt box? Thank you!

  7. Sandeep says:

    Rename the export file to .xlsx and your problem is solved.


  8. Shira says:

    But I don’t know whether my clients will have Office 2003 or Office 2007 installed.  If I just name the file ".xlsx" then my downloads won’t work for many clients.  Is there any way to have the client machine check which verison of MS Office is opening up and determine the file extension on the fly based on that?

  9. Denny says:

    I’m with Shira. That’s not much help at all.

Skip to main content