Exemplo n.º 1
0
        /*
         * public void CreateExcelFile(string strExcelName)
         * {
         *
         *
         *  ExcelFileClose();
         *  string[] columnNames = new string[]
         *  {
         *      "모델명", "트리거", "날자", "시간", "위치", "바이셀", "옵셋X", "옵셋Y", "Angle", "측정결과", "장축길이", "장축결과", "단축길이", "단축결과",
         *      "세파넓이", "세파결과", "전송시간", "쵤영간격"
         *  };
         *
         *  workbook = new XLWorkbook();
         *  worksheet = workbook.Worksheets.Add("Sheet1");
         *
         *  for (int i = 0; i < columnNames.Length; i++)
         *  {
         *      worksheet.Cell(1, i + 1).Value = columnNames[i];
         *  }
         *  workbook.SaveAs(strExcelName);
         *  worksheet.Dispose();
         *  workbook.Dispose();
         *
         *  workbook = new XLWorkbook(strExcelName);
         *  worksheet = workbook.Worksheet(1);
         * }
         *
         */

        public void CloseExcelFile(string strExcelName)
        {
            workbook.Save();
            worksheet.Dispose();
            workbook.Dispose();
        }