# Read table

![](/files/Pw4rnBlVw0OHzWkYymQF)

Element reading a tabular control element. The component works correctly only inside the Connect to an Application container.

![](/files/ntZnHtBrvZSzrymshsC1)

Properties

\- Search pattern: \[String] Control search pattern

\- Control: \[LTools.Desktop.Model.DUIControl] Control reference

\- Variable\*: \[LTools.Desktop.Model.UIDataTable] Variable for storing table reading results

\- Time-out\*: \[Int32] Element finish max time (ms)

LTools.Desktop.Model.UIDataTable - Properties:

\- RowCount: \[Int32] Row count

\- ColumnCount: \[Int32] Column count

\- Headers: \[List] Column headers

\- Data: \[List>] Table data

```
C#
LTools.Desktop.DesktopApp app = LTools.Desktop.DesktopApp.Init(wf, null, "Test_*", 20000, true, LTools.Desktop.Model.DesktopTypes.UIAUTOMATION);
//Search pattern
LTools.Desktop.Model.UIDataTable tbl = app.ReadDataGrid("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}");
//Component link
LTools.Desktop.Model.DUIControl el = app.FindElement("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}");
tbl = app.ReadDataGrid(el);
foreach (var r in tbl.Data)
	foreach (var c in r)
		LTools.Workflow.AstroApp.AddToLog(wf, c);

Python
app = LTools.Desktop.DesktopApp.Init(wf, None, "Test_*", 20000, True, LTools.Desktop.Model.DesktopTypes.UIAUTOMATION)
#Search pattern
tbl = app.ReadDataGrid("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}")
#Component link
el = app.FindElement("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}")
tbl = app.ReadDataGrid(el)
for r in tbl.Data:
	for c in r:
		LTools.Workflow.AstroApp.AddToLog(wf, c)
		
JavaScript
var app = _lib.LTools.Desktop.DesktopApp.Init(wf, null, "Test_*", 20000, true, _lib.LTools.Desktop.Model.DesktopTypes.UIAUTOMATION);
//Search pattern
var tbl = app.ReadDataGrid("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}");
//Component link
var el = app.FindElement("{\"Name\":\"\",\"AutomationID\":\"dtgrdSample\",\"ClassName\":\"DataGrid\",\"AUIProperties\":[],\"TextSearchMode\":0,\"IsRoot\":false,\"IsQuickSearch\":false}");
tbl = app.ReadDataGrid(el);
for (var i = 0; i < tbl.Data.Count; i++)
	for (var j = 0; j < tbl.Data[i].Count; j++)
		_lib.LTools.Workflow.AstroApp.AddToLog(wf, tbl.Data[i][j]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://astro-rpa.gitbook.io/astro-rpa-user-guide/g_elements/el_basic/els_desktop/el_desktop_gettable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
