I have been working on a task for a long time and to no avail, I still cant solve it. I need to create an excel file in ASP .net and manually write the data. Much more like looping through the cells and do writing on specific cells as well as merging them. I cant use third party components and also, after the the excel file has been created and populated it should pop-up with the user.
If anyone can provide an example or at least provide an idea on how can this be possible, it will be a great help because it's been a frustrating month for me working on this.
Thanks in advance.
Loading
Santhosh Kumar JayaramanPosted Jan 8, 2013, 8:31 AM
I have made changes . I did it in a hurry.
If you want to change the second grid position, then we have to pass some columns starting position also to the export method, which i didnt do. So all grids will come next to each grids.
The attached solution will give an outline/rough idea, from where you can develop.
Santhosh Kumar JayaramanPosted Jan 8, 2013, 8:34 AM
Guest UserPosted Jan 8, 2013, 8:33 AM
Guest UserPosted Jan 8, 2013, 8:12 AM
Guest UserPosted Jan 8, 2013, 8:12 AM
I just want to confirm. You created an HTML table to accomodate your grid contents and then you extracted the grid. If I were to extract multiple grids and put them as multiple tables on the excel file, how do I do that?
I tried to copy and paste the part that creates the table and put it below, but I still get 1 grid on excel file.
Thanks...
Santhosh Kumar JayaramanPosted Jan 8, 2013, 7:38 AM
Guest UserPosted Jan 8, 2013, 7:26 AM
Santhosh Kumar JayaramanPosted Jan 8, 2013, 7:23 AM
http://www.c-sharpcorner.com/UploadFile/1a81c5/export-datatable-to-excel-with-formatting-in-C-Sharp/