UIPATH uses datatable to process data in three ways (oledb, dataview, datatable.select)

FYI: The difference between dataview and datatable.select is the number of final data rows.

Because dataview.totable can generate datatable, it is more suitable for multi-row data.

And datatable.select comes out as datarow[], which is more troublesome to integrate into datatable, and is more suitable for data with only one or two rows.

 

1.OLEDB(ODBC)

Mainly for database, data in excel. Need to use connection string.

SQL language is suitable for difficult data processing.

Control order: connect--execute (non) query--disconnect

2.dataview

It is more suitable to use in excel, and you can start to do it after reading the datatable.

Can complete where, order, distinct functions. 

Control order: read range( output(dt) )-

-assign( dv=new dataview(dt,"[age]=25 and [sex]='male'","[name]",dataviewrowstate.currentrow) )-The second parameter is where and the third is order , The fourth does not know what it does

-assign( dt2=dv.totable(true,"[id]","[name]","[age]","[sex]") )-totable has three overloads, totable()=totable(true ) Output the entire dataview (the true is distinct is true), the second parameter starts with the output column, and distinct must be satisfied at the same time.

3.datatable.select

Excel is suitable, and the result of select is datarow[].

Can complete where and order functions. Output the entire line.

Control order:

read range(output(dt))-

-assign( dr=dt.select("[starttime]<>'' and [complete]<>'Done' ") )-with overload, dt.select("where condition", sort field)

You can use datarow[] directly.

 

 

Guess you like

Origin blog.csdn.net/weixin_31808811/article/details/83592581