def to_xlsx(self, **kwargs):
        """
        Write workbook to a .xlsx file using xlsxwriter.
        Return a xlsxwriter.workbook.Workbook.

        :param kwargs: Extra arguments passed to the xlsxwriter.Workbook
        constructor.
        """
        from xlsxwriter.workbook import Workbook as _Workbook
        self.workbook_obj = _Workbook(**kwargs)
        self.workbook_obj.set_calc_mode(self.calc_mode)

        for worksheet in self.itersheets():
            worksheet.to_xlsx(workbook=self)

        self.workbook_obj.filename = self.filename
        if self.filename:
            self.workbook_obj.close()
        return self.workbook_obj
Write workbook to a .xlsx file using xlsxwriter.
        Return a xlsxwriter.workbook.Workbook.

        :param kwargs: Extra arguments passed to the xlsxwriter.Workbook
        constructor.