Need to calculate two columns of notepad

Hi I have a notepad which has got data, I have created headers (seperated with comma), now I am trying to calculate 2 values available under 2 different headers. I do not have Excel so can anyone help.

I have done read CSV and created a datatable but there after I am lost

Hi @dipon1112000

Read the text file and store it in a variable and the use the generate data table activity and generate a table using the comma separator and then use the for each row in data table and pass the output of the generate data table activity. Within the for each use the assign activities and pass the data in the rows and pass them as the int data types.

Regards

Hello @dipon1112000
Try this

  1. Use For each datatable and pass the datatble variable from the Read CSV.
  2. Use assign variable and add the values by using Below or Print Below using Message box
=Cint(Currentrow("Header1").tostring)+Cint(Currentrow("Header2").tostring)

Hi @dipon1112000

Use the below WorkFLow

Regards

Hi @dipon1112000

Here is the workflow
Sequence.xaml (15.5 KB)
Document.txt (25 Bytes)

Regards

Thank for your responce but I have a CSV file (but not Excel) I have done read CSV , so should I create generate data table, it will be great if you can provide the steps post creation of generate data

HI @dipon1112000

Is the below attached method is okay?

Regards

Thank you for your responce but I have CSV (not Excel) and I have 10 headers seperated by comma and I am trying to calculate value of header 10 with header 11

Hi @dipon1112000

Can you please share the sample input.

Regards

Hi @dipon1112000

I have attached the sequence please check that for the better understanding.
Sequence.xaml (17.2 KB)
image

Regards

Column1,Column2,Column3, Column4,Column5, 1020,FCC Fee, 90.00,FCC,0.10,
1020,FRANCHISE FEÉ,90.00,FFE,2.70,
1020,Cable Franchise, Fee City, 90.00,FF3,0.08,

Here I am trying to devide 0.10 (Column5) to 90.00 ( Column3 is the header)

As it is in CSV and not Excel so I did
1 Read CSV and made a datatable as dt1
2. Got output data table
But I am unable to fetch data from column3 as it says that column3 is not declared

But column3 is supposed to be present in dt1 right

Hi @dipon1112000

Please Keep the data in Excel and share the excel, we will convert the excel into CSV as the input provided by you was not perfect.

Regards

Thanks for the reply but I do not have the option of Excel that is y I have to use CSV with header seperated with (,)

Hi @dipon1112000

Please share the screenshot of the data present in CSV

Regards


!

Hi @dipon1112000

Please correct me if i’m wrong

You have data in notepad and then you need to read the entire data and need to do the calculations as per requirement right?

Regards

Yes that is correct so I am supposed to devide column3 with column5 and get the result in column6 (this need to be added)

1 Like

Hi @dipon1112000

With data provided by you if I use the comma separator and generated a data table then the data came as shown below.

In the above screenshot Column 3 and Column 5 contains string also please check.

Rgards