I wanna get sum of columns and write cell in other worksheet
How can I get sum of columns and write other worksheet?
Thank you for reply
Report.zip (2.6 MB)
Step 1: Use Excel Application Scope
Use this activity to open the Excel file.
Step 2: Read Range
Use this activity to read the data from the source worksheet and store it in a DataTable. Make sure to specify the range or sheet name you want to read.
Step 3: Compute Data Table
Use this activity to calculate the sum of the columns in the DataTable. You can use expressions like DataTable.Compute(“SUM(Column1)”, “”) to get the sum of a specific column. Repeat this for each column you want to sum.
Step 4: Write Cell
Use this activity to write the calculated sum into a cell in the destination worksheet. Specify the cell location and the value to write.
Hi @toto6343
Please find the below xaml for your reference
BlankProcess14.zip (904.6 KB)
Hope this helps!!
Welcome to the community
To read data into datatable use read range activity(you have excel and workbook related activities)
If you need sum of a column then use dt.AsEnumerable.Sum(function(x) CDBL(x("ColumnName").ToString))
this gives sum which can be stored in double type variable
Then use write cell to write th data to excel
Cheers