1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| ExlObj = new Microsoft.Office.Interop.Excel.Application();
if (ExlObj == null)
{
MessageBox.Show("ERROR: EXCEL couldn't be started!");
System.Windows.Forms.Application.Exit();
}
ExlObj.Visible = true;
theWorkbook = ExlObj.Workbooks.Open(@"C:\Users\monpc\Desktop\excel_chart\Classeur1.xlsx", 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true);
sheets = theWorkbook.Worksheets;
worksheet = (Worksheet)sheets.get_Item(1);
capteur cap1 = new capteur(1, "adresse 1");
capteur cap2 = new capteur(2, "adresse 2");
List<capteur> list_cap=new List<capteur>();
list_cap.Add(cap1);
list_cap.Add(cap2);
groupe_capteurs group_cap = new groupe_capteurs(list_cap, 1);
List<groupe_capteurs> list_group_cap = new List<groupe_capteurs>();
list_group_cap.Add(group_cap);
mesure mesure = new mesure (list_group_cap, "temperature", chart1, worksheet);
mesure.remplir_datatable(); |
Partager