Opposite sing Excel

Hi Team I have Input file like this
Sheet „stdvalue”:
image
I want my Output as
Sheet „ CIM 3.7”:
image
Please help me to get Output

the formula on sheet „CIM 3.7” in column B („Quantity”) you can see that it basically takes the opposite of the combination of corresponding sign (column F) and quantity value (column G) on sheet „stdvalue

HI,

Can you try the following sample?

{CurrentRow(0),(-1*Double.Parse(CurrentRow(5).ToString+CurrentRow(6).ToString,System.Globalization.NumberStyles.Any)).ToString("#,0")}

Saple20230414-6L.zip (10.3 KB)

Regards,

Hi @Kuldeep_Pandey

Read the datatable without headers & execute this query in Invoke Code:

dt.AsEnumerable.Skip(1).ToList.ForEach(Sub(row)
row(6) = if(row(5).ToString.Trim.Equals("+"), "-"+row(6).ToString, "-"+row(6).ToString)
End Sub)

This will give update the entire data table as you need. Then you can transform/load the data to any other sheet as per your requirement.

Input:

image

Output:

image

Hope this helps,
Best Regard.

Hi Yoichi I am getting error in ADD Data row

HI,

Did you create datatable for AddDataRow in advance? If not, please create it using BuildDatatable or ReadRange etc.

Regards,

I have provided Read Range Activity and give read range variable in for each datable

HI,

What variable do you set at DataTable property?

image

Is it initialized by BuildDataTable or ReadRange etc?

And also, can you check content of each variable at Locals panel when workflow stops due to exception.

Regards,


Getting wrong Output

Its Adding Item no again in quantity

Hi,

Can you share your input and expected output as file, if possible?

Regards,

Birthday.xlsx (61.3 KB)
Pls Check my file IN as 3.7 I Want Output

HI,

Can you try the following?

Saple20230414-6Lv2.zip (49.0 KB)

Regards,

Thankyou Yoichi

1 Like

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