#functions# using Excel = Microsoft.Office.Interop.Excel; Excel.ApplicationClass ExcelObj; Excel.Workbook theWorkbook; public Excel.Worksheet OpenExcel(string file) { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); ExcelObj = new Excel.ApplicationClass(); ExcelObj.Visible = true; theWorkbook = ExcelObj.Workbooks.Open(file, 0, false, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, false, false); return (Excel.Worksheet)theWorkbook.Worksheets.get_Item(1); } public Excel.Worksheet CreateExcel() { System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US"); ExcelObj = new Excel.ApplicationClass(); ExcelObj.Visible = true; theWorkbook = (Excel.Workbook)(ExcelObj.Workbooks.Add( System.Reflection.Missing.Value )); return (Excel.Worksheet)theWorkbook.ActiveSheet; } public void FillExcel(Excel.Worksheet sheet, string[,] data) { for(int i=0;i 0) { for(int i=0;i