Dynamic Excel column reference in StudioX

I have a downloaded file that may have the columns in any order. I have an automation in which I insert a column AFTER a named column (e.g., insert a column “FullName” after the column “LastName”), and then I want to populate a formula in the new column (e.g., a formula that combines “FirstName” and “LastName”). However, I can’t find a way to reference the new column by its header, such that I can populate the new column with a formula. Because it can be anywhere on the sheet, I can’t reliably say to populate column N, for example.

Is there a way to reference a column by its header in StudioX so that I can Write Cell in, for example, “FullName” row 2, and then autofill the rest of column?

Hello @pg_ava!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

Hi there,
I found your question when I looked for answer to my issue.
Anyway since I am here I try to answer, one of the possible solution to your issue is to automate each step on excel app level. For example, first find the fixed name of a column, then step right using tab key, then insert column in the płacę you landed, then go to top using ctrl and up arrow, then insert the column name. It’s not sophisticated way of automation but hopefully should do the job. Let me know :slight_smile:

I’m looking for an answer to this situation, too. I have created a table (using Format as Table). Then I can use Write Cell to put in a formula that uses the column names (e.g., =[@[PRICE]] * [@[QTY]]).

If I want to refer to the cells in a column of that table in Excel, I can use a structure reference (e.g., [TOTAL]). How can I refer to the cells like that in UiPath StudioX?

Currently, I have to use cell referencing in StudioX. (e.g., SalesData.Sheet(“Sales”).Range(“E2:E3269”)