I have a template file, which i am creating multiple sheets of in a new Workbook. All the data shows up fine but the data decides to format itself differently than what the template file is formatted for. It changes font, sometime font size and weight, and reformats the cell number formatting. Below is my code on creating the sheet from the template. Let me know if you need to see my entire class.
IApplication application = excelEngine.Excel;
//Open the template workbook
IWorkbook templateWorkbook = application.Workbooks.Open(path);
//Get the template worksheet
IWorksheet templateSheet = templateWorkbook.Worksheets[0];
//Open a workbook with a blank sheet
IWorkbook workBook = application.Workbooks.Open(blankPath);
//Copy the template sheet to the blank sheet workbook
IWorksheet sheet = workBook.Worksheets.AddCopy(templateSheet);
//move the sheet to the front of the line
sheet.Move(0);