def ernst_table_exporter(self, cycle, outfname='table_out',
                             sheetname='Sheet 1'):
        """
        This routine takes NuGrid data (model output) for a given
        cycle and writes it into an Excel sheet.

        This is one format as requested by Ernst Zinner in June 2013
        (through Marco).  If you want all radioactive isotopes, start
        from the restart file.  Empty columns are not written out and
        you will get a message how many were empty.  Please note that
        only one cycle is written out.

        Parameters
        ----------
        cycle : integer
            Number of the cycle to consider.
        outfname : string, optional
            File name to write it to, .xlsx is appended automatically.
            The default is 'table_out'.
        sheetname : string, optional
            Name of the sheet in the excel file.  The default is
            'Sheet 1'.

        """

        from xlsxwriter.workbook import Workbook # https://xlsxwriter.readthedocs.org/ Note: We neex xlswriter. Please meake sure it is installed. Run pip install xlsxwriter to install it using pip. If pip is not installed, install it via easy_install pip. Depending on the system you are on, you might need sudo rights for thesethings.'

        # isotopes and data
        all_data = np.array(self.get(cycle,'iso_massf'))
        header_data = self.se.isotopes

        # get mass data
        mass_data = np.array(self.get(cycle,'mass'))[np.newaxis]

        # stack mass data and header together
        header_data = np.hstack((['Mass'],header_data))
        all_data    = np.hstack((mass_data.transpose(),all_data))


        # zero the cells with 1.e-99 entry
        for i in range(len(all_data)):
            for j in range(len(all_data[i])):
                if all_data[i][j] == 1.e-99:
                    all_data[i][j] = 0.

        # check how many columns have all zeros in the file
        colzero = 0
        all_sum = all_data.sum(0)
        for i in range(len(all_sum)):
            if all_sum[i] == 0.:
                colzero += 1

        print(str(colzero) + ' columns are empty. Skipping them.')

        # now filter data
        all_data_fil = np.zeros((len(all_data),len(all_data[0])-colzero))
        header_data_fil = np.zeros((len(header_data)-colzero),dtype='|S9')
        k = 0
        for j in range(len(all_data[0])):
            if all_sum[j] != 0:
                for i in range(len(all_data)):
                    all_data_fil[i][k] = all_data[i][j]
                header_data_fil[k] = header_data[j]
                k += 1

        # write to excel file
        excelfile = Workbook(outfname + '.xlsx')
        wsh = excelfile.add_worksheet(sheetname)
        print('If you run from a restart file, this might take a little bit. Be patient!')
        for i in range(len(all_data_fil)):
            for j in range(len(all_data_fil[i])):
                if i == 0:
                    wsh.write(0,j,header_data_fil[j])
                wsh.write(i+1,j,all_data_fil[i][j])

        excelfile.close()
        return None