Value of type 'String' cannot bne converted to 'DataTable'

Hi there, I’m in a cath-22 situation now.

I have a For each row in data table activity, and I grab text of different webpages based on a list of URL’s in a Google Spreadhseet. This part is OK. Then I need to insert these texts into the same spreadsheet, but here’s the problem at the final step:

  1. I can’t insert string into a Google spreadsheet, because it expects a datatable. (“Value of type ‘String’ cannot bne converted to 'DataTable”)
  2. When I try to change to string to database, it does not allow me because texts can’t be converted to database.
  3. When I try to use the Assign activity, the problem is the same.
  4. When I try to change the variable type in the Properties, it does not let me.

I tried to insert a build database activity as a new step within the loop but that breaks as well. Anyone has a clue what to do? :frowning:

Hi @janos.bencsik

Create Build data table activity before loop and in For each loop use Add data row activity then after for each use Write Range activity

Regards,

@janos.bencsik,

If you are looking for updating single cell at a time. Use Activities - Write Cell

Thanks,
Ashok :slight_smile:

Thank you, I also tried to add data row activity but string-db conversion still not works either :frowning:

This is how my workflow looks now:
Read Range in GSheet → For each row in Data Table → Body: Use Browser → Do: Get Text → Write Range

Does that mean that in a for each row it will automatically go from A1 to A2 then to A3 and so on? I just need to populate a single coloumn.

@janos.bencsik,

You will have to provide it.

If your iteration is starting from first row then you can create a Index variable of For Each and append that to address like "A"+intIndexVariable.ToString

Thanks,
Ashok :slight_smile: