//private int FindPossibleFirstDataRow(Microsoft.Office.Tools.Excel.Worksheet worksheet) //{ // int[] possibleFirstDataRows = new int[10]; // for (int i = 1; i < 11; i++) // { // Type type = null; // for (int j = 1; j < 12; j++) // { // Type tempType = null; // if (worksheet.Cells[j, i].Value != null) tempType = ResolveType(worksheet.Cells[j, i].Value); // if (type != null && type != tempType) // { // possibleFirstDataRows[i - 1] = j < 10 && worksheet.Cells[j, i].Value != null ? j : 2; // break; // } // type = tempType; // } // } // return possibleFirstDataRows.Max(); //} //private void findFirstDataRowButton_Click(object sender, RibbonControlEventArgs e) //{ // rowCorrectionDropDown.SelectedItemIndex = FindPossibleFirstDataRow(Globals.Factory.GetVstoObject(Globals.ThisAddIn.Application.ActiveWorkbook.ActiveSheet)); //} private async void dropTableButton_Click(object sender, RibbonControlEventArgs e) { _dataBaseSettings.TableName = (Globals.ThisAddIn.Application.ActiveSheet as Excel.Worksheet).Name; await _databaseService.DropTable(); }