Export details to EXCEL,ASP.NET,C#

Posted by Raja_89 under ASP.NET on 3/12/2013 | Points: 10 | Views : 1022 | Status : [Member] | Replies : 2
Hai
Is it possible to generate a single excel sheet for various functions

Example:
In a shop the admin may generate the stock details,sold out details in a excel with some headings




Responses

Posted by: Jayakumars on: 3/12/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

put sample out put snapshots

Mark as Answer if its helpful to you

Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Johnw on: 3/12/2013 [Member] Starter | Points: 25

Up
0
Down
Hello,

Do you just want to generate an Excel file which you can write and edit data or export data from database to a new generated Excel?

If the former, the following code is enough.

            //Generate File

Workbook book = new Workbook();
Worksheet sheet = book.Worksheets[0];
//Write Data
sheet.Range["A1"].Text = "Product Name";


I use a commerical .NET Excel component, Spire.XLS for .NET.

If the later, I think this article: http://www.c-sharpcorner.com/UploadFile/83fe73/solutions-to-export-data-from-database-to-excel-in-C-Sharp/ will be quite helpful.


Not what, but how

Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response