Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How insert a row based on the row count Into a existing excel sheet

Parthasarathi
8 - Asteroid

Hi All,

 

I have a excel sheet with 1000+ rows of data with two categories, based on the category column I need to insert a new row in the excel sheet. 

 

Category1 - 700 rows

Category2 - 300 rows

 

Have to insert a new row in Category1 at position 701. Someone please help me with this and thanks in advance.

8 REPLIES 8
IraWatt
17 - Castor
17 - Castor

Hey @Parthasarathi,

Its hard to suggest ion method without any example data. But If you just want to append the new data to the bottom of each catagory you could use a method like this:

IraWatt_0-1662121509011.png

The record ID Tool keeps track of the original order. The union adds the new data then the multirow formula assigns a record ID number grouped on category and finally we sort the result.

 

The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

 

 

Parthasarathi
8 - Asteroid

Hi,

 

Thank you for your quick reply. Actually the table in the excel will look like the below. I need to insert one or more rows after all the "Reverse" category. If the category is "New File" then I have to insert the rows after all the New File rows.

 

SourceOriginal NameClean NameName as on AppDynamic ID
ReverseNew Company 1, City Name, StateNew Company 1Company 1 
ReverseNew Company 2, City Name, StateNew Company 2Company 2 
ReverseNew Company 3, City Name, StateNew Company 3Company 3 
ReverseNew Company 4, City Name, StateNew Company 4Company 4 
ReverseNew Company 5, City Name, StateNew Company 5Company 5 
ReverseNew Company 6, City Name, StateNew Company 6Company 6 
ReverseNew Company 7, City Name, StateNew Company 7Company 7 
ReverseNew Company 8, City Name, StateNew Company 8Company 8 
New FileNew Company 9, City Name, StateNew Company 9Company 9 
New FileNew Company 10, City Name, StateNew Company 10Company 10 
New FileNew Company 11, City Name, StateNew Company 11Company 11 
New FileNew Company 12, City Name, StateNew Company 12Company 12 
New FileNew Company 13, City Name, StateNew Company 13Company 13 
New FileNew Company 14, City Name, StateNew Company 14Company 14 
New FileNew Company 15, City Name, StateNew Company 15Company 15 

 

IraWatt
17 - Castor
17 - Castor

Ah okay so does my setup work here:

IraWatt_0-1662123782895.png

Its inserted the two new rows at the bottom of their Sources.

 

Parthasarathi
8 - Asteroid

Great, that works as expected

Parthasarathi
8 - Asteroid

Hi, 

 

Could you please let me know how to write this updated data into the same excel sheet without creating a duplicate or deleting the current sheet.

IraWatt
17 - Castor
17 - Castor

@Parthasarathi so do you want a new sheet created with all the added data?

Parthasarathi
8 - Asteroid

 No, I want to update the same sheet, not creating a new sheet.

IraWatt
17 - Castor
17 - Castor

Ah that's alright, if you use an output data tool and select your Excel file there is an option here to overwrite just the sheet:

IraWatt_0-1662130079042.png

 

Labels