I need to solve Excel issue

Hi My excel file look like

but i need

How to do this pls support me

Thank You

@MD_Farhan1

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

  1. Build one data table with only headers as Description, Quantity and rate and save to data table variable Dt_output

  2. Open excel file and use read range activity to read the complete sheet

  3. Loop through the range

  4. Check if Quantity have value or not

  5. If value available, Use Add Data Row Activity and add details to Dt_output {Description, Quantity, Rate}

  6. Get the last row count of Dt_output

  7. if quantity is blank - read the description and append to last row description of Dt_output

  8. Next loop

At the end -Dt_output will have the required results. Save to another excel file

1 Like

@MD_Farhan1

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()

The image displays a code snippet written in VB.NET to filter and manipulate rows from a DataTable based on certain conditions concerning the "Description" column. (Captioned by AI)

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)

3 Likes

Thank you for your Effort

1 Like

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