I'm trying to export the contents of a datagrid to excel which I have been able to do as long as its to a generic excel workbook. I can't figure out how to direct to open a specific workbook, create a new tab with a name that I create in code, & save the datagrid to that. tab(worksheet).

For example I want it to open C:\mydocuments\myworkbook.xls, create a new worksheet named "0914 to 0920", and export the datgrid to that.

I've been able to designate a file name but no luck with path or worksheet names

Response.AddHeader("content-disposition", "attachment;filename=" & myfilename)
Response.Charset = ""
Response.ContentType = "application/vnd.xls"

This is an old post but I thought I would bump it as I am having the same issue.

The file to open to post result to a excel tab could be stored on the server in my case though. If that makes it any easier.