Add data in excel Data table UIPath - uipath

I have 3 columns in an excel file and 3 variables(Age,name,Family) that change.
I need to add data each time in a new line.
I create an Excel Application Scope, open excel file. Then 3 Assign where filling in variables with values like
age = 19
Then 3 Add Data Row element and in Data Row field I write variable age. Next Add Data element Name.
But I have error.
Table:
Age Name Family
12 Kate Nooq

If I understood correctly I think you want to add the Data Row that you have created to the end of your data, I mean to say Append the Row at the end of your Excel Data.
If that is the case please use Append Range Activity and provide you new Data Table with the new Rows added.
You will need to create a temporary data table and add the data rows in that datatable with new rows and use this datatable to the Append Range Activity

Related

How to save the data in a different column instead of replacing the data in same column

I have one field on my form (field example name "completion_date"). This data is stored to table column "completion_date". When users edits the detail, data is overwritten in the backend table field as a default way of storing the data. How can I pass on the existing data in this column to a new column (completion_date_a) when the user saves a new date in the field.
One option is to create a database trigger, e.g.
create or replace trigger trg_bu_date
before update on your_table
for each row
begin
:new.completion_date_a := :old.completion_date;
end;
/
Littlefoots' answer is correct, but you could also do this in apex with very little work. Suppose your form items are P1_COMPLETION_DATE and P1_COMPLETION_DATE_A, both mapped to their respective database column. P1_COMPLETION_DATE_A is hidden. Add a computation to P1_COMPLETION_DATE_A with point "After Header" and type "Item". Pick P1_COMPLETION_DATE as item.
Now when you save the form, the value of P1_COMPLETION_DATE_A will be set to the value of P1_COMPLETION_DATE when it was selected.

Compare text file and table values for insert/update/delete

I have text file which looks like as below,
ID1~name1~city1~zipcode1~position1
ID2~name2~city2~zipcode2~position2
ID3~name3~city3~zipcode3~position3
ID4~name4~city4~zipcode4~position4
.
.
etc goes on...
This text file is the source file and I want split the file (~) and compare the table with ID.
If the value is not in the table, insert operation should perform.
If the id is available in the table but other column values are different then need to update the table.
If the id is not available in the text but available in the table then then the record should get deleted.
I did goggle it but i could find the below page,
https://www.experts-exchange.com/questions/27419804/VBScript-compare-differences-in-two-record-sets.html
Please help me how I can proceed with VBscript.
Whose leg you are trying to pull? Obviously the desired/resulting table is the input table, so use "load data infile" to import the file.

Delete columns from BIRT report

I have a BIRT Excel Report with 10 columns. I have a query which executes and brings the data for all the 10 columns.
However, based on one of the input parameters, i need to display just 8 columns. I am able to hide the remaining 2 columns but i would like to delete those 2 columns from the report so that user does not see the hidden columns.
I tried to change the query but i am unable to dynamically set the select parameters.
Is there a way either in Query or in BIRT to remove few columns based on an input condition.
You cannot delete the columns, but it's sufficient to hide them dynamically using the column's visibility expression. You can add an aggregation to the table, using the MAX function for the column data (let's call it max_name).
E.g. if your table column shows the DS column NAME and you want to hide the column if NAME is empty for all rows:
Add an aggration (let's call it MAX_NAME) to the table, with the aggregation function MAX and the expression NAME. Then in the visibility expression of the table column, use !row["MAX_NAME"] as the expression.
After drag and drop the dataset. Right click on column header and select the delete column option.

Insert Rows in Word table

I have a code which allows me to open a word application and create a table with 4 columns and 10 rows.
Is it possible with VBScript to insert new rows between the existing ones? I couldn't find the command for that.
The Rows.Add method has an optional parameter BeforeRow. Pass it the Row object of the row that should follow the new Row. https://msdn.microsoft.com/en-us/library/office/ff838946.aspx?f=255&MSPPError=-2147217396

How to create table dynamically based on the uploaded csv file column header using oracle apex

Based in the csv file column header it should create table dynamically and also insert records of that csv file into the newly create table.
Ex:
1) If i upload a file TEST.csv with 3 columns, it should create a table dynamically with three
2) Again if i upload a new file called TEST2.csv with 5 columns, it should create a table dynamically with five columns.
Every time it should create a table based on the uploaded csv file header..
how to achieve this in oracle APEX..
Thanks in Advance..
Without creating new tables you can treat the CSVs as tables using a TABLE function you can SELECT from. If you download the packages from the Alexandria Project you will find a function that will do just that inside CSV_UTIL_PKG (clob_to_csv is this function but you will find other goodies in here).
You would just upload the CSV and store in a CLOB column and then you can build reports on it using the CSV_UTIL_PKG code.
If you must create a new table for the upload you could still use this parser. Upload the file and then select just the first row (e.g. SELECT * FROM csv_util_pkg.clob_to_csv(your_clob) WHERE ROWNUM = 1). You could insert this row into an Apex Collection using APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY to make it easy to then iterate over each column.
You would need to determine the datatype for each column but could just use VARCHAR2 for everything.
But if you are just using generic columns you could just as easily just store one addition column as a name of this collection of records and store all of the uploads in the same table. Just build another table to store the column names.
Simply store this file as BLOB if structure is "dynamic".
You can use XML data type for this use case too but it won't be very different from BLOB column.
There is a SecureFile feature since 11g, It is a new BLOB implementation, it performs better than regular BLOB and it is good for unstructured or semi structured data.

Resources