Im having issues adding a row to the top of a datatable. I originally “read range” the xlsx into a datatable and the headers for the columns were there. however, I needed to transpose the datatable to move the existing 2 rows of 24 columns into 2 columns of 24 rows. this worked but in the process, it removed my header row. So now when I’m converting the datatable to a dictionary to upload as a single transaction item in the orchestrator queue I’m unable to reference the Column names. Any know how to add a datatable row to the top of the datatable instead of appending it to the bottom?
Well this semi-worked however it has now replaced the first row containing a value I need to upload with the names of the columns I specified in the assigned field.
By adding a column to the end of the original datatable before the transpose with the values of Column1 and column2. Then use the “Datatable Set Ordinal” Activity from the UiPathTeam.DatatableSetOrdinal.Activity Package I was able to set the index of the newly created column to 0 making it the first column. Then I transposed the original datatable with the “Transpose Datatable” activity from the NovigoSolutions.trasposeDataTable.Activities Package.