Get number of columns Version 1 (.Net)
Action group: Excel
Description
The action gets the number of columns in the table. Columns within the used context range are counted. If a row specified is outside the used context range, the action returns an empty result.
Action icon
Settings of parameters
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Контекст | Контекст действия для работы с Excel-документом | Robin.Excel | Контекст excel | Да |
Индекс строки | Индекс строки, количество столбцов которой необходимо получить. | Robin.Numeric | 1 | Да |
Пропустить скрытые столбцы | Если значение «true», действие будет считать только видимые столбцы. | Robin.Boolean | true | Нет |
Пропустить пустые столбцы | Если значение «true», действие будет считать только заполненные столбцы. | Robin.Boolean | true | Нет |
Результаты | ||||
Результат | Количество столбцов из указанной строки. | Robin.Numeric |
Special conditions of use
The robot will return an error if the negative row index or 0 is entered.
Example of use
Task
There is an Excel-document with a table.
Get the number of filled columns in row 1.
Solution
Use the "Open", "Get number of columns", "Close" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open" action parameters.
- Set the "Get number of columns" action parameters.
- Set the "Save" action parameters.
- Set the "Close" action parameters.
- Click "Start" and see the result.
Result
The number of columns is counted.