LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • Getting Started
    • Excel Overview
  • Workbooks
    • Create an Excel File
  • Worksheets
    • Add a Worksheet
    • Get a Worksheet
    • Get Worksheets
    • Get an Item from an Excel Worksheet
    • Extract Text from a Worksheet
    • Remove a Worksheet
    • Save a Worksheet
  • Tables
    • Insert a Table
    • Extract a Table from a Worksheet
    • Get a Singular Table from an Excel Worksheet
    • Delete a Table
  • Rows
    • Get a Row
    • Get a Row's Cell
    • Insert a Row
  • Columns
    • Insert a Column
  • Cells
    • Get a Cell Value
    • Get a Cell's Column Label
    • Get a Cell's Formula
    • Get a Cell's Row Number
    • Set a Cell's Value
  • Changelogs
    • Get Changelog
    • Apply Changelog
Powered by GitBook
On this page
  • Overview
  • Prerequisite Data
  • Syntax
  • Examples

Was this helpful?

Export as PDF
  1. Columns

Insert a Column

Insert a column into an existing Excel worksheet.

Overview

This procedure inserts a column into an existing Excel worksheet at a specified column number. The existing column at that position, along with any columns to its right, is shifted one position to the right. This is useful in automation workflows where new data fields need to be dynamically added without overwriting existing content, such as inserting calculated columns or preparing templates for data entry.

Prerequisite Data

These required data elements must be present in the automation before using the procedure.

Data Name
Data Type

the worksheet

Excel Worksheet

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

insert a column into the worksheet where

What does it do? References an Excel worksheet to insert a column into.

Where does it go? This phrase should be written on a new line.

Does it require input data? ⛔ No — This phrase does not require input data.

Is it required? ✅ Yes — This phrase is required in the syntax.

the column name is

What does it do? Specifies the name of the column to add.

Where does it go? This phrase should be indented beneath insert a column into the worksheet where.

Does it require input data? ✅ Yes — A Text value should be specified.

Is it required? ✅ Yes — This phrase is required in the syntax.

the column number is

What does it do? Specifies the position to insert the new column at (Columns are numbered starting with 1).

Where does it go? This phrase should be indented beneath insert a column into the worksheet where.

Does it require input data? ✅ Yes — A Number value should be specified.

Is it required? ✅ Yes — This phrase is required in the syntax.

the column values are

What does it do? Optionally specifies a list of values to add to the new column. An empty column will be added if not specified.

Where does it go? This phrase should be indented beneath insert a column into the worksheet where.

Does it define new data? ✅ Yes — List

Is it required? 🌟 No — This phrase is optional in the syntax.

Examples

1. Insert a Column by Specifying a Column Name and Number

insert a column into the worksheet where
    the column name is "TAX"
    the column number is 2

2. Insert a Column by Specifying Column Name, Number, and Values

insert a column into the worksheet where
    the column name is "TAX"
    the column number is 2
    the values are 30, 40, 50

Last updated 4 days ago

Was this helpful?