def save_to_excel(self): """ Saves data to excel spreadsheet """ if self.reaction_data.is_single(): if self.reaction_data.get_replicates() == 0: WarningMessage(message="You need to imput some data first.") dialog = QtGui.QFileDialog() filename = QtGui.QFileDialog.getSaveFileName(dialog, "Save File", os.getenv("HOME"), "Excel Workbook (*.xlsx)") if filename: calculations.data_to_xls(self.reaction_data, filename)
def run_analysis(self): # selet folder to save the results to if not self.savepath: WarningMessage(message="Please specify save folder") return savefolder = self.create_valid_folder(self.savepath) raw_data_xls = make_file_path([savefolder], 'input_data.xlsx') calculations.data_to_xls(self.alldata, raw_data_xls) for cbox, parameter in zip(self.optcb, self.equations): if cbox.isChecked(): if self.alldata.is_single(): self.make_ss_outpust(savefolder, parameter) else: self.make_ds_output(savefolder, parameter) WarningMessage(message="Results have been saved to {}".format(savefolder))