BC30512: Option Strict On disallows implicit conversions from ‘object’ to ‘datatable’. The selected value is incompatible with the property typ

hi, i am in automation where i am reading a data table and by using for each row getting some value and pasting to a word file using “insert data table in a document’” but getting following error

BC30512: Option Strict On disallows implicit conversions from ‘object’ to ‘datatable’. The selected value is incompatible with the property typ

  1. am i doing it in correct manner of should try in other way?
  2. if yes then how to solve this error.

Hi @Hemant_Deshmukh

Instead of using Insert DataTable in Document activity use Replace Text in Document activity

Cheers!!

replace activity only work for 256 character.
i am not replacing any thing. i just want fill data below headings(fix format).

@Hemant_Deshmukh

Can you try the below

dt_Names=DT.DefaultView.ToTable(False, "Names")
dt_Age=DT.DefaultView.ToTable(False, "Age")
dt_Address=DT.DefaultView.ToTable(False, "Address")

Cheers!!

CurrentRow(1) is an object (a column) not a datatable. The activity accepts a datatable variable. Your datatable variable is dt1 - you give that to the Insert DataTable in Document activity. There’s no need to loop and do it row by row.