Error in write range


i am taking string text and write in excel but its show me error

@Kuldeep_Pandey you can not write string, your variable is string type please change it to datatable

what i have to write?

In write range you can write only datatable, please change Type of out1 to DataTable

@Kuldeep_Pandey, Can you elaborate what are you doing and what you want to do.

image


i am going on a page and taking one text and write it in a excel sheet

@Kuldeep_Pandey Use "Append Line Activity " if you want to add just one text

you are getting one text so it will store in String then you can’t use in Write range because Write range is taking input as DataTable. So please use append line activity to write string.

how to use give example

so i can write the data in excel

WriteLine.xaml (7.5 KB)
please follow this one with generic.

Explanation,
1-Build DataTable DT1
2-Give suitable column name
3- after getting text put add data row.
4- give text and datatable DT1 to Adda Data Row Activity
5-Then Write DT1 through Write Range

@Kuldeep_Pandey
WriteLine.xaml (7.7 KB)
updated file

like i am not able to understand
any simple expression to convert string data into data table?

@Kuldeep_Pandey Its simple way, can you share your code please

@Kuldeep_Pandey
please run this
Resource Utilization.xaml (169.3 KB)

so i have to ADD 3 data row ?

becz i want to write 3 text in different column

@Kuldeep_Pandey
add two more columns in DT1 by editing build data
pass array like {Out1, Out2,Out3} in data row

@Kuldeep_Pandey
Resource Utilization.xaml (169.6 KB)
updated code

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