Hi,
How do i round up column H?
and
How can I sum up values from columns F,H and I?
Hi,
Can you share specific example as a file? It’s no problem if dummy data.
Regards,
User Input_v3 (for UiPath).xlsx (20.6 KB)
Hi,
How about the following?
Total of ColumnF
dt.AsEnumerable.Where(Function(r) r("Total Labor Cost").ToString.IsNumeric).Sum(function(r) CDbl( r("Total Labor Cost") ))
Total of ColumnH (Round up each value)
dt.AsEnumerable.Where(Function(r) r("Estimated Labor Hours").ToString.IsNumeric).Sum(function(r) Math.Ceiling(CDbl( r("Estimated Labor Hours"))))
Total of Column I
dt.AsEnumerable.Where(Function(r) r("Total Labor Cost").ToString.IsNumeric).Sum(function(r) CDbl( r("Repair Cost from Management (USD)") ))
Sample
Sample20230414-3L.zip (18.1 KB)
Regards,
I believe the best way is to do a read range activity, you get an output dt_excel in your system and then simply:
do a foreach datatable
write cell or something in dt to currentrow(“Repair cost”) =
(cint(currentRow(“Total labor cost”) + cint(currentRow(“labor rate”) + cint(currentRow(“labor hours”))).tostring.trim
and then use a write datatalbe to excel activity