I have almost done can anyone please help me find solutions for this total issue.
Here is my final report(Report-20210731213800.xlsx) I trying to print the total value at the D6 column it should sum of D2 to D5 = “2544” I added the same way for column “C” and column “D” it’s working fine, but column D not working. (Report-20210731213800.xlsx)
When am trying to convert I got an error as Assign: Conversion from type ‘DBNull’ to type ‘Integer’ is not valid.
Seems error saying “my data table has some null value”, but, I’ve data in the excel file there is NO NUll value refer D2 to D5 “Report-20210731213800.xlsx”
@Shagoul_Hameed
Glad that you got the solution to your problem.
I have a suggestion that might make your life easier.
Since you’re reading the Excel into your UiPath code, you don’t need to use Excel formulas in Write Cell activity.
While inside For Each Row loop, you can do something like - Assign -> Data4Value = CInt(CurrentRow("DATA3")) - CInt(CurrentRow("DATA3")) Write Cell -> Data4Value
CInt = Cast to Integer (This code casts the value to an integer).
CurrentRow will automatically increment the row number, so you won’t have to use "D" + "<complex logic to find column>"
Personally I find it easier to completely update my datatable, and write it back to the same sheet in one go. This way I can avoid tedious implementation of Write Cell activity.