private void btnOK_Click(object sender, RoutedEventArgs e) { result = GoogleHistoryManager.GoogleHistory(this.tbSecurityId.Text, DateTime.Parse(this.tbStartDate.Text), DateTime.Parse(this.tbEndDate.Text)); if (ExcelHandler.WriteToRangeHandler != null) { ExcelHandler.WriteToRangeHandler(result); } }
private void button_Click(object sender, RoutedEventArgs e) { this.Close(); if (ExcelHandler.WriteToRangeHandler != null) { ExcelHandler.WriteToRangeHandler(this.result, this.History); } }
private void postToExcel() { if (result.Count > 0) { if (result.ContainsKey("test1")) { string[,] response = result["test1"]; //dynamic xlApp = ExcelDnaUtil.Application; //dynamic sheet2 = xlApp.ActiveWorkbook.WorkSheets("Sheet2"); //dynamic newSheet = xlApp.ActiveWorkbook.Worksheets.Add(After: sheet2); //dynamic range = newSheet.Range("A1:B" + (response.GetUpperBound(0) + 1).ToString()); //range.Value = response; //ExcelOperator.ReadWriteRange.WriteToRange(response); if (ExcelHandler.WriteToRangeHandler != null) { ExcelHandler.WriteToRangeHandler(response); } } result.Remove("test1"); } }