예제 #1
0
    def __init__(self):
        self.settings = Settings()
        try:
            self._excel = openpyxl.load_workbook(self.settings.my_path + '\\' +
                                                 self.settings.active_xl)
            self._sheet = self._excel.active
        except IOError:  # Need to create an excel sheet.
            FileHelper.create_current(self.settings)
            self._excel = openpyxl.load_workbook(self.settings.my_path + '\\' +
                                                 self.settings.active_xl)
            self._sheet = self._excel.active
            self.gen_dates()

        if self._new_sheet():
            Popups.full_warning()