Hi My excel file look like
but i need
How to do this pls support me
Thank You
Read data from excel and store it in datatable
use filter datatable activity and remove rows where Quantity and rate is empty
Follow below steps
Build one data table with only headers as Description, Quantity and rate and save to data table variable Dt_output
Open excel file and use read range activity to read the complete sheet
Loop through the range
Check if Quantity have value or not
If value available, Use Add Data Row Activity and add details to Dt_output {Description, Quantity, Rate}
Get the last row count of Dt_output
if quantity is blank - read the description and append to last row description of Dt_output
Next loop
At the end -Dt_output will have the required results. Save to another excel file
Attaching sample workflow for your reference.
DeleteBlankRows.zip (119.8 KB)
if it helps please mark post as solution!!
happy automation!!
Hi @MD_Farhan1 ,
Use below method.
dtoutput=dt.clone()
dtoutput=(From row In dt.AsEnumerable() Where Not row("Description").ToString.Trim.StartsWith("(") Let desc = row("Description").ToString.Trim Let subDesc = String.Join(",", dt.AsEnumerable().Where(Function(x) x("Description").ToString.Trim.StartsWith("(")).Select(Function(x) x("Description").ToString.Trim)) Select dtOutput.Rows.Add(desc & If(subDesc <> "", ", " & subDesc, ""), row("Quantity"), row("Rate"))).CopyToDataTable()
![]()
Regards,
Arivu
Hi,
This method to remove whole row but i mention clearly in screenshot.
Thank You
Hi,
This method to remove whole row but i mention clearly in screenshot. pls check another method.
Thank You
Hi,
how to use this pls explain me i am fresher.
Thank you
Hi,
If Possible to share workflow better to understanding me.
Thank you
Kindly check the workflow after referring to my above comments. It is working fine and tested from my side
PLease understand the concepts as well. You can google each steps to understand the logic used here
BlankProcess.zip (130.6 KB)
Thank you for your Effort
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.