Exemplo n.º 1
0
 public void moveSheetToEnd(Excel.Worksheet sheet, Excel.Workbook target)
 {
     // moves the sheet to the end of the workbook
     int sheetCount = target.Sheets.Count;
     try
     {
         sheet.Move(Type.Missing, target.Sheets[sheetCount]);
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message, "Worksheet Move Failed", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
     }
 }