/// <summary> /// Export Video-Analysis Results to Excel-Sheet /// </summary> public static void ExportResultsToExcelSheet() { if (!XLSExporter.IsExcelInstalled()) { ShowExceptionAndShutDown(new Exception("Excel is not installed. Please install Excel to execute this function.")); } XLSExporter.InitializeExcel("AnalysisResult", false); foreach (KeyValuePair <string, RingBuffer> ringBuffer in RingBuffers) { ringBuffer.Value.ExportData(ringBuffer.Key); } //XLSExporter.GenerateOverviewChart("AnalysisResult", FaceWatcher.EnabledClassifiers); XLSExporter.ShowResults(); }
/// <summary> /// Write RingBuffer to Excel /// </summary> /// <param name="sheetname"></param> /// <param name="ringBuffer"></param> public static void WriteMetaToExcel(string sheetname, RingBuffer ringBuffer) { int row = 1; int column = 1; XLSExporter.WriteValue(sheetname, "Instant Improvement Evaluation Results", row, column); row = 3; //Headlines XLSExporter.WriteValue(sheetname, "Delta T [s]", row, column); XLSExporter.WriteValue(sheetname, "Values", row, column + 1); row++; for (int i = 0; i < ringBuffer.RawData.Count; i++) { XLSExporter.WriteValue(sheetname, ringBuffer.RawData[i].Timestamp, row + i, column, false); XLSExporter.WriteValue(sheetname, ringBuffer.RawData[i].Value, row + i, column + 1, false); } GenerateChart(sheetname, rowStart: row, rowEnd: row + ringBuffer.RawData.Count - 1); }
/// <summary> /// Export Data to Excel-Worksheet /// </summary> /// <param name="worksheetName">Name of Worksheet</param> public void ExportData(string worksheetName) { XLSExporter.AddWorksheet(worksheetName); XLSExporter.WriteMetaToExcel(worksheetName, this); }