<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_excel(self, filepath: str, title: str):
 """Write the main dataframe to an Excell file :param filepath: path of the Excel file to write :type filepath: str :param title: Title of the stylesheet :type title: str :example: ``ds.to_excel_("./myfile.xlsx", "My data")`` """

        try:
            self.start("Saving data to Excell file: "+filepath + " ...")
            writer = pytablewriter.ExcelXlsxTableWriter()
            writer.from_dataframe(self.df)
            writer.open(filepath)
            writer.make_worksheet(title)
            writer.write_table()
            writer.close()
            self.end("File exported to", filepath)
        except Exception as e:
            self.err(e, "Can not convert data to Excel")