Within the app, I work with the functions SpreadsheetCalculationInput and SpreadsheetCalculation. I have created the following definition to fill the spreadsheet:
def fill_spreadsheet(params) -> vkt.spreadsheet.SpreadsheetCalculation:
inputs=[]
return vkt.spreadsheet.SpreadsheetCalculation.from_path(SPREADSHEET_PATH, inputs=inputs)
And to get the results I use:
def _get_evaluated_spreadsheet_result(self, params, return_file=True): # True of False?
general_inputs = []
for _name in INPUTNAMES:
general_inputs.append(SpreadsheetCalculationInput(_name, eval("params."+_name)))
sheet = SpreadsheetCalculation.from_path(SPREADSHEET_PATH, inputs=general_inputs)
result = sheet.evaluate(include_filled_file=True)
return result
It would be good to get the pdf from a sheet within the same excel file which I use to generate the results. But to do this, I need to hide all the other worksheets, so I need the openpyxl. Would it be possible to use the result from the _get_evaluated_spreadsheet_result() and use openpyxl to hide the worksheets? Or would I need to change the functions as used in Excel in VIKTOR: some tips and tricks (featuring openpyxl)?