Table Operations
🔗 Original page — Source of this material
Description
Tables are used to handle more complex data than ❗→ lists, for example, a catalog for an online store where each row contains different data: name, price, description, etc.
The same action is used when working with Tables and with Google Sheets, but Google Sheets has a few unique actions that are covered in the article Operations with Google Sheets.
How do I add a Table to a project?
Before you start, you need to create either a Table or a Google Sheet.

How do I add an action to a project?
From the context menu, select Add action → Tables → Table Operations

Or use the ❗→ smart search.
What is this used for?
- Working with sets of data
- Adding and retrieving table elements
- Deleting rows, columns, and duplicates
- Linking to a file
- Getting the number of rows and columns
How does the action work?
You can specify the column number as either a number (starting from zero!) or, like in Excel, as an uppercase Latin letter!
Get column
Put the values of a specific column into a ❗→ list

- Select the table you'll work with.
- Choose the function.
- Set the column or variable.
- The ❗→ list where all column values will be saved.
Example
Get rows
Get rows optionally deleting them from the table, and write them into a ❗→ list or ❗→ variables.

- Select the table you'll work with.
- Choose the function.
- Row criteria (can use a variable): a) All b) Does not contain text c) Does not match a ❗→ regular expression d) First e) ❗→ By index (indexing from zero!) f) Random g) Contains text h) Matches a ❗→ regular expression
- Should the rows be deleted after processing?
- Save the result to a ❗→ list or variables.
Example
Add list
Put the values from a list into a specific column.
- Select the table you'll work with.
- Choose the function.
- Set the column or variable.
- ❗→ List with the values.
Example
Add row
Add a row to the table.

- Select the table you'll work with.
- Choose the function.
- Enter static text or a variable.
- Important note
The row will be added to the end of the table
If you want to add several rows at once, use the Text Processing-to Table action.
Example
Write to cell
Add text to a specific cell.

- Select the table you'll work with.
- Choose the function.
- Specify cell coordinates as static values or using ❗→ variables.
- Enter static text or a variable.
Example
Add text to a specific cell

❗→ Table 1
Before processing
After processing
Rows are always added to the end of the table
Get number of columns
How many columns the table contains

- Select the table you'll work with.
- Choose the function.
- Variable for the result.
The variable will always contain only a numeric value
Example
Get number of rows
How many rows the table contains

- Select the table you'll work with.
- Choose the function.
- Variable for the result.
The variable will always contain only a numeric value
Example
Link to file
Link the table to a file during project execution.
This action should be used when the file path is not known at template start but will be determined while the project runs.

- Select the table you'll work with.
- Choose the function.
- Select the file or specify a variable containing the file path.
- If there’s no file at the specified path, Zennoposter will automatically create it.
Read cell
Get the value from a specific cell

- Select the table you'll work with.
- Choose the function.
- Specify cell coordinates as static values or via variables.
- Variable for the result.
Example
Sort table
Sort table elements in ascending or descending order.

- Select the table you'll work with.
- Choose the function.
- Zennoposter will automatically detect columns that have values and offer a selection.
- Use number comparing logic (this works when the column only has integers. If there are floating-point values, the column is sorted as strings).
- Set the sort type: *descending or *ascending.
Example
Save to file
Save the table to a file during project execution

- Select the table you'll work with.
- Choose the function.
- Select the file or specify a variable containing the file path.
The function only overwrites files
Example
Remove duplicates
Remove duplicate values from the table

- Select the table you'll work with.
- Choose the function.
- Zennoposter will automatically detect columns with values and offer a choice.
Delete column
Completely removes the specified column from the table

- Select the table you'll work with.
- Choose the function.
- Specify the column or variable.
The column will be deleted with all its values
Delete rows
Deletes the specified rows from all columns

- Select the table you'll work with.
- Choose the function.
- Row criteria (can use a variable): a) All b) Does not contain text c) Does not match a ❗→ regular expression d) First e) ❗→ By index (indexing from zero!) f) Random g) Contains text h) Contains only whitespace i) Matches a ❗→ regular expression
The specified row will be deleted in all columns
Example
Recommendations for working with tables
Follow these rules to ensure your projects work correctly
- Avoid linking very large files (hundreds of megabytes) to a table without the “❗→ Save table changes to file” option, especially if you have little RAM.
- When you use a table linked to one file in several templates, use the same delimiter. If in one template your columns are separated by
;and in another by-, you will get an error. - If you run your template in multithreaded mode and want each thread to work with its own row, enable the “❗→ Save table changes to file” option and take data from the table with ❗→ deletion after fetching.
- If all projects are only reading from the file, there shouldn’t be any issues. When you sync with the file, there’s one table for all threads and all changes in any thread are reflected in the table.
- If you don’t use file syncing, then a separate table copy is created for each thread. In this case, deleting a row in one thread won’t affect the table in others.
- Keep in mind that tables in RAM take up much more space than the original file on disk. For example, a table based on a 10 MB CSV file in 100 threads without file syncing can take up 5 GB in RAM. Try not to use lists and tables in “without syncing” mode unless absolutely necessary.
Usage example
Collect the names of needed products from web pages into a list and add them from the list to a table for further use.

- Load the pages.
- Collect the required values into a list.
- Create a table.
- Add the action and specify Add list.
- Specify the list and column to save values to.












