Hi there,
I’m trying to read results from my spreadsheet application, but the results are always [-] as shown below. I’m new to viktor and not really sure what is causing this. It only occurs when the results in the output cells are a formula, if it is a direct value, it is able to read the information just fine.
This is my excel output sheet where the values colum has simple formula that is reading values from another sheet. I can assure that the cell has the correct value when I download the evaluated spreadsheet.
This is my code:
# Data views
@DataView('Results', duration_guess=1)
def get_data_view(self, params, **kwargs):
result = self.get_evaluated_spreadsheet(params)
total_co2_one = result.values['total_co2_one']
total_co2_two = result.values['total_co2_two']
total_co2_three = result.values['total_co2_three']
total_co2_four = result.values['total_co2_four']
data = DataGroup(
total_co2_1 = DataItem('Co2_1', total_co2_one, suffix='CO2', number_of_decimals=2),
total_co2_2 = DataItem('Co2_2', total_co2_two, suffix='CO2', number_of_decimals=2),
total_co2_3 = DataItem('Co2_3', total_co2_three, suffix='CO2', number_of_decimals=2),
total_co2_4 = DataItem('Co2_4', total_co2_four, suffix='CO2', number_of_decimals=2)
)
return DataResult(data)