I am using Aspose.cells in my application and i face the totaling issue. I have referred to your earlier posts for solving this issue however it is still persisting. I am attaching my excel sheet along with the code snippet. Please have a look and let me know if i need to change anything with my code.
But your forget to set the datasource "CONVENTION_LEVEL" . And you can use WorkbookDesigner.Open method to replace WorkbookDesigner.Workbook.Open method to open the file.
Thanks for your time and support. I added the snippet as suggested by you.
Please find two excel sheets and the code (in word document) attached. One excel sheet is the template(cms_Budget_rpt) and other is the output (OUTPUT_cmsBudget_rpt) that is generated. I have added comment for the line in ehich i am facing the error.
If the field’s value is null, please do not use “” as value of the cell.
See following codes:
If (oRsData.Fields("next_budget") <> Null) Or (oRsData.Fields("next_budget") <> "NULL") Then
If (IsNumeric(oRsData.Fields("next_budget"))) Then
arr2(i)= CInt(oRsData.Fields("next_budget"))
Else
arr2(i) = oRsData.fields("next_budget")
End If
End if
I’m not v family with VB. You have to assign null as the value.
If (oRsData.Fields("next_budget") <> Null) Or (oRsData.Fields("next_budget") <> "Null")
Or (oRsData.Fields("next_budget") <> "")
Then
If (IsNumeric(oRsData.Fields("next_budget"))) Then
arr2(i)= CInt(oRsData.Fields("next_budget"))
Else
arr2(i) = oRsData.fields("next_budget")
End If
End if
If you still get the error, please you print your result value of “next_budget” to html page with Response.Write and post them.