Beispiel #1
0
 public GenerarExcel(M_Eno m, string titulo)
 {
     this.m      = m;
     this.titulo = titulo;
     excel       = new Excel.Application();
     libro       = (Excel._Workbook)excel.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);
     hoja        = (Excel._Worksheet)libro.Worksheets.Add();
     hoja.Name   = "Resultado Del ENO";
     ((Excel.Worksheet)excel.ActiveWorkbook.Sheets["Hoja1"]).Delete();
     generarDocumento(ref hoja);
     if (System.IO.File.Exists(Environment.CurrentDirectory + @"Result.xlsx"))
     {
         libro.Save();
     }
     else
     {
         libro.SaveAs(Environment.CurrentDirectory + @"\Result.xlsx");
     }
     libro.Close();
     releaseObject(libro);
     excel.UserControl = false;
     excel.Quit();
     releaseObject(excel);
 }
Beispiel #2
0
 public M_Cruze(M_Eno m)
 {
     this.m = m;
 }