public void GetData() { Excel.Worksheet activeWorksheet = ((Excel.Worksheet)Application.ActiveSheet); activeWorksheet.UsedRange.Clear(); //Bind Dataset to the Active Excel Sheet. Microsoft.Office.Interop.Excel.Range rng = AddData(MeasureExport.ReadStream(GlobalVariables.workingDirectory, GlobalVariables.propertiesDirectory, GlobalVariables.propertiesFile), activeWorksheet); //Autosize the columns based on the resulting data activeWorksheet.Columns.EntireColumn.AutoFit(); }
private void changeWorkingDirectory(string newDir) { if (MeasureExport.CheckExport(newDir)) { txtWorkingDirectory.Text = newDir; GlobalVariables.workingDirectory = newDir; Properties.Settings.Default.defaultWorkingDirectory = newDir; Properties.Settings.Default.Save(); } else { if (displayError("The selected directory does not contain the exportMeasure.exe. Please browse to a valid location containing exportMeasure.exe", "Invalid Directory", MessageBoxIcon.Error) == DialogResult.OK) { txtWorkingDirectory.Text = GlobalVariables.workingDirectory; } } }
private void Help_Load(object sender, EventArgs e) { txtHelp.Text = MeasureExport.GetHelp(GlobalVariables.workingDirectory); }