Dear frnds,
I found the correct answer to this question, here that code:
.aspx.cs
public void AllTabExport(DataTable dt, String sheetname)
{
string jobno = ddlno.SelectedItem.Text;
string jobrevno = ddlRevNo.SelectedItem.Text;
Aspose.Cells.License Lic = new Aspose.Cells.License();
Lic.SetLicense("Aspose.Cells.lic");
Workbook workbook = new Workbook();
workbook.Worksheets.Clear();
workbook.Open(Server.MapPath(".") + @"\Report\Model-Template.xls");
Worksheet worksheet = workbook.Worksheets.Add("GAD_Model_Template");
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
worksheet.Cells.ImportDataTable(dt, true, "A1");
workbook.Save(Server.MapPath(".") + @"\Report\GAD_Model_Template_" + Convert.ToString(Session["UID"]) + "_" + jobno + "_" + jobrevno + ".xls");
ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('Data has been sucessfully expored');", true);
}
Thanks for your kind coordination Smile !
Thanks and regards,
Parthiban K.