Excel value is not updating as datatable

Hi

Need help as my datatable is not updaing value in Excel.

I create a file Read Excel-- which has only this where I read current file and creating a datatable.


image

Under the Test file

I did an output of ID of currentRow and it gives med ID as output and foreach loop is working fine as it gives med ID one by one.

I tried to Update the column name “Status” on currentrow as assign. but its not update value in excel.
I did a write line and it has the status value.
As the argument on datatable is in/out I think it should work but its not working.

Can someone tell what im missing?
Or help me how to update the Datatable.

Hi,

If you want to update the excel file, it’s necessary to write back the datatable into Excel file. Can you try to use WrirteRange activity at the end of the workflow?

Regards,

@Latif

the update is happening in datatable but not in excel..

if you want in excel after update use write range

alternately..you can use for each row in excel instead of datatable so that the update is made on excel directly

cheers


WriteRang expect I use excel application scope and im not using that.. as you can see in pictures i use ReadRangWorkbook and creating a DataTable.
In another file I use that dataTable as for each row in datatable so im not using Excel application scope.

Hello @Latif

You would use a Write Range Workbook activity which does not require an Excel Process Scope (or Excel being installed).

Regards
Soren

This expecting that i give a Path but i do not use Path as i have All files in folder activity outside of read range-

TestExcel.zip (8.6 KB)
Can you check the project I attached.. may be you understand what im trying to do.

Hi,

Can you also share ReadExcel.xaml file?

Regards,

sorry forgot
ReadExcel.xaml (12.7 KB)

Hi,

Thank you for sharing. In this case, it’s better to use ForEachFile in caller workflow because file name is necessary when write back.

Sample
Sample20251119-2.zip (21.7 KB)

Regards,

Thanks for the answer.. it works and now i want to ask..
Is it possible to invoke another file inside foreach row table?
And how can i take that current row to that invoke file so that i can use data from excel in another file?
Hope you got my query.

Yes. The following sample will help you. (It calls sub.xaml inside ForEachRow and create file which is written in original excel file.

Sample20251119-2 (2).zip (24.2 KB)

Regards,

Ok I tried something and i think it worked but check if i did right or wrong.
Sample20251119-21.zip (206.4 KB)
The one i did when you will run it .. will update excel with this value

kindly inform my invoke argument is good and the place where i added update excel should be there or not.

Hi,

It seems no problem.
If I had to add something comment, it will also work to change argument type from InOut to In. Because datarow type is reference type.

Regards,

so if i change argument value to In and not in/out will it still update value to excel as i didt update value inside the invoke flow.

Hi,

Sorry, but I don’t fully understand your question. Can you share your case / concern in detail?

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.