How to insert new column in excel sheet


#1

I will get excel sheet from the dynamically,how to insert column in the given excel sheet.


#2

Hi,
Did you check “Insert Column” activity
https://www.uipath.com/activities-guide/insert-column


#3

Hii, thanks for reply
Insert column is only useful for tables ,but in my excel sheet tables are not there


#4

You just has to create a datatable output variable for the excel and pass that variable in “insert column” activity.
Any excel template you have.


#5

I am sharing one sample document with some random data,the sheet contains 3 columns i have to insert one new between B and C column,can you please help me with thatBook1.xlsx (8.1 KB)


#6

Hi,
My bad i thought its Datatable but its just a table.:stuck_out_tongue:
Np here is workaround. Added new column :slight_smile:
insercolumn.xaml (8.3 KB)


Insert column at first position
Exception thrown while adding trying to add new column to an existing excel file
#7

Thank you so much for the solution.Is there any possibility to insert between two columns.


#8

You could do that but its bit messy
either use macros to swap between column or you need to use inbuilt shortcut key of excel and use send hotkey to perform the same.


#9

Hi @ddpadil,

Tried your WF and it’s’ working. But when i add new column at the end to an excel with existing columns, Nothing happened like No added column executed. Can you please help me with this? Appreciate your help thanks.


#10