i need export datatable of 6'00'000+ records excel. i tried code below, but getting outofmemory exception
. thought export these records multiple sheets instead of single sheet overcome error.
here code export data excel.
private void exportdatatoexcel(datatable tbl) { response.clear(); response.clearcontent(); response.contenttype = "application/octet-stream"; response.addheader("content-disposition", "attachment; filename=periodicjobevents.xls"); gridview excel = new gridview(); excel.datasource = tbl; excel.databind(); excel.rendercontrol(new htmltextwriter(response.output)); response.flush(); response.end(); }
kindly me understand how export 6'00'000+ records multiple sheets.
Comments
Post a Comment