How to create No.of Excel Sheets in one Excel File..

Posted by Manorama under Error and Solution on 4/29/2013 | Points: 10 | Views : 1653 | Status : [Member] | Replies : 3

Hi to all,

Here I done One application by using MVC3 .Requirement is to export to Excel ,But i want only in one excel file with no.of Excel Sheets .not like with dynamic creation of tables

For that purpose what i will do ,

please Guide me


Thanks in Advance

ManoRama


Responses

Posted by: Jitendrasoft09 on: 4/30/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi,
You have to return always same file with action result in controller and need to return the sheet name with increment, please look into below link that would be helpful for you.
http://www.dotnetpools.com/Article/ArticleDetiail/?articleId=208&title=Code-to-export-to-excel-file-in-MVC3-ASP.net

Jitendra Kumar
If my post helps you, plz mark as an answer.

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

Posted by: Manorama on: 5/1/2013 [Member] Starter | Points: 25

Up
0
Down
Hi jitendra kumar,

Like That its ok, i already saw that one ,but what is my Requirement is ,if i am browsing the excel sheet like TestCase...in that suppose i have shee1,sheet2.... it stores to in that excel only and again browsing same Excel File, if already data Existing in that sheet1 Excel then it goes to sheet2.... in the same excel file.

For that purpose what i will do ,
please Guide me

Thanks in Advance
ManoRama

ManoRama

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

Posted by: Jitendrasoft09 on: 5/1/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Dear Manorama,
As same as above. If data is exist then when you are storing the data into excel you keep some value to viewdata and matches to before viewdata value is exist or not based on that u can move to another sheet if viewdata is not exit, please refer below link as well implement as your same requirement-
http://www.prideparrot.com/blog/archive/2012/8/uploading_and_returning_files

Jitendra Kumar
If my post helps you, plz mark as an answer.

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

Login to post response