Basic excel operations

Created by akaBot Support, Modified on Thu, 8 Aug, 2024 at 2:21 PM by akaBot Support

Introducing the Knowledge Required to Create Robots Using Excel

By referring to this article, you can deepen your understanding of how Excel works and the indispensable DataTable type for automating Excel operations.

1. Excel Operations

When operating Excel with a robot, unlike the image of a human opening Excel and working, the work is done programmatically without opening Excel. Therefore, you can hardly confirm operations on the desktop. When performing Excel operations, it is essential to use the "Excel Application Scope." You create robots by assembling activities within the "Excel Application Scope" activity.

2. About the DataTable Type

The DataTable type is used mainly when handling data operations such as dealing with Excel or CSV files. The DataTable type is a table format composed of rows and columns. It features the ability to perform operations such as "reading, rewriting, storing, and constructing" data. Rows are represented as "Row" and columns as "Item." Unlike Excel sheets, rows "Row" are counted from 0 instead of 1, and columns "Item" are 0, 1, 2... or column names (headers) instead of A, B, C... Specific locations can be specified by combining row numbers and column numbers (or column names).


Note: The above image is an example without including column names (headers).

Here, we will introduce how to retrieve specific values from the DataTable type. For example, if you want to retrieve Tonny (the value of cell B2 in an Excel sheet),

Retrieving by specifying row number and column number:

mathematica

Copy code

VariableName.Rows(0).Item(1).ToString → Tonny


Retrieving by specifying the column name instead of the column number:

mathematica

Copy code

VariableName.Rows(0).Item("Name").ToString → Tonny



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article