Excel render_spreadsheet error


I am trying to run an excel macro file. The code below returns the error "expected <class ‘int’> for the render_spreadsheet function.

Do you have an idea where this comes from?

Thanks for your help,


    @DataView("Excel", duration_guess=2)
    def run_excel(self,params,**kwargs): 

        #input def
        input_cells = [
            # DirectInputCell('sheet1', 'E', 9, params.tab_1.section_0.configuration)
        #macros def 
        macros = [Macro('CalcEp')]
        area_cell = DirectOutputCell('sheet1', 'E', 46)
        direct_output_cells = [

        template_path = Path(__file__).parent / 'check.xlsm'

         #fill spreadsheet with values/text
        with open(template_path, 'rb') as f:
            template_as_bytes = BytesIO(f.read())
            filled_spreadsheet = render_spreadsheet(template_as_bytes, input_cells)
        #input excel arguments
        excel = Excel(template=filled_spreadsheet, named_input_cells=input_cells,
                    macros=macros, direct_output_cells=direct_output_cells)

        return DataResult(area_cell.result)

Is that a typo or did you deliberately leave a # in front of the DirectInputCell in your snippet?

It’s not a typo, I was checking that the problem was not coming from this line.

Hi Melissa, would it be possible to DM me the spreadsheet and input values you are using?