This project has moved. For the latest updates, please go here.

Set Worksheet as default open

Oct 25, 2011 at 7:42 PM

Hi Guys

I'm new to EPPlus, but I love it already, really useful package.

 

I am looking for a way to set a default worksheet to be open when you open a newly created excel document. I know excel currently opens the worksheet that the latest changes were made in, and I am trying to replicate this. 

Has anyone been successful with this? Or even attempted it before?

 

Thanks

Nov 1, 2011 at 8:01 PM

I have found the answer, if any one else is looking.

 

ExcelPackage package = new ExcelPackage(new FileInfo(newFileName))

 

package.Workbook.Worksheets["TABNAME"].View.TabSelected = true;