Data scraping to Excel and add formulas

Hello,

Who can help me?

I used the data scraping tool to get all the information that i need (device name and listed price including VAT. then I wrote it down to Excel with Write range so far so good.

But when I want to add some forumlas to the sheet, Excel cannot read the pricetag someting with the format:

How to change the format of the column “Price incl VAT” so my formulas are working again.

My workflow:

Hi @AdminTT

Welcome UiPath community…

To which format you would like to change it buddy…for the column price incl vat

Cheers

Hi @Palaniyappan

Thank you for the quick response!

I would like to change it into Valuta or numbers, some format that Excel can use to execute math formulas, such as calculate “Price incl VAT to Price excl VAT”

Greetings

Can i have a view of that column alone as a screenshot to make sure that next to 649 is always ,- in 659,-
or will have value instead of -
Do you need that value for your consideration buddy

This can sorted out
Cheers…

Here is a view of the column:
,- this part is not mainly needed but came with the data scraping.

@AdminTT
Buddy, thank you

So its always - only next to the number and comma…Great

  1. now use a for each loop to iterate through the datatable

  2. inside which use a assign activity like
    row(“Price incl VAT”) = Convert.ToDouble(row(“Price incl VAT”).ToString.Replace(“,-”," ").Trim)

  3. Now all the value in that column will get converted to double datatype of value

  4. now you export the datatable with this new column to a excel and apply your formula

Hope this would help you buddy
Kindly revert if any tweak needed on to resolve this

Cheer…!

Is that working buddy

Cheers

Not yet, trying to find out the following error, maybe I do someting wrong :slight_smile:

After implement:

I get the following error:
Implicit conversions from String to integer are not allowed by the option strict on

Buddy

try with row.item(“Price incl VAT”) buddy instead of row(“Price incl VAT”) in left side and in right side as well
Convert.ToDouble(row.item(“Price incl VAT”).ToString.Replace(“,-”," ").Trim)

The reason why we get this error is the column Price incl VAT is of type string while we are trying to assign a double value… that why showing error " mplicit conversions from String to integer are not allowed by the option strict on"

Cheers

Thank you for your help so far,

Here I am with the next one, could not find .item within the editor, when I try this I get the following error “item is not a member of System.Data.DataTable”

Greetings

row.Item(columnindex) buddy, may i at which activity you are assigning this

Cheers

row.item(columnindex) not found.

I uploaded my workflow.xaml maybe when you see my workflow you see what I’m doing wrong

Main.xaml (17.3 KB)

1 Like

@AdminTT
Here is your xaml buddy hope got resolved

Main.xaml (20.6 KB)

Cheers

2 Likes

Thank you for you help, I see now what I did wrong.

Greetings.

1 Like

Cheers buddy keep going

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