Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
//Use ExcelApplication to make a copy of a regional worksheet for each
//country that is selected by the user. 
protected void GenerateTemplate()
{
            
}

2. Instantiate In the helper method, instantiate the ExcelApplication object.

Code Block
ExcelApplication xla = new ExcelApplication();

3. Open the Workbook template file with ExcelApplication.Open(ExcelTemplate) method.

Code Block
Workbook wb = xla.Open(Page.MapPath(@"templates\template.xlsx"));

...