prabhu p

prabhu p

  • NA
  • 181
  • 115k

How to download excel from datatable using gembox in asp

Jun 3 2016 1:19 PM
Hi,
My objective is  download Excel with three sheets from  three datatable  in asp .net but its not downloading with out any error
 
using gembox.spreedshhet;
 
ExcelFile ef = new  ExcelFile();
Excelworksheet ws =  ef. worksheets.Add("Summary"); //adding three sheets
Excelworksheet ws1 = ef. worksheets.Add("Summary1");
Excelworksheet ws2 = ef. worksheets.Add("Summary2"); 
 
WS.Insertdatatable(dt,"A1",true);  // dt,dt1,dt2 are datatable
WS1.Insertdatatable(dt1,"A1",true);//A1 Cell statring 
WS2.Insertdatatable(dt2,"A1",true);  
ef.savsxls(test.xls) ;
 
 
one more thing i able to place excel in my project folder by giving filepath as Filesteam fs and passed to  ef.savsxls(fs) ; but I need to download in browser its very urgent, Can any one help me 
 
 thanks
 
 
 
 

Answers (1)