Get data from CSV and store it into records(Entity)

Hi All,


I am facing an issue in storing data into entity.

I have a CSV file and need to store the CSV file data in entity,

I tried adding using CSV util, but was not able to.


Following is the excel data:-


Can anyone help me on this.


Thanks,

DM

Hi DM,

Could you please explain what issue you are facing ?


Regards,

Jitendra

Jitendra Raghuvanshi wrote:

Hi DM,

Could you please explain what issue you are facing ?


Regards,

Jitendra

I am fetching file from a directory and storing it in the Binary data(bytes) format;

Now i need to extract data from this stored binary data; 

So how do i do this; Originally the files are of CSV files; I store them into binary data.

I need to extract this binary data and store it into Outsystem database(entity)



To be specific:- Binary data of CSV files

I need to convert it to JSON and the store it into OS entity

Thanks for the concern.

Jitendra Raghuvanshi wrote:

Hi DM,

Could you please explain what issue you are facing ?


Regards,

Jitendra


Hi,

One more thing to mention my file has Microsoft Excel Comma Separated Values File (.csv)

and not Microsoft Excel Worksheet (.xlsx)


Thanks,

DM

Hi Diraj,

Please find the screenshot below for the approach you can pick to achieve the desired result.

you can pass the binary content to excel to recordlist and define it's record definition and then process the same.

Hi Dhiraj,

In case of csv then try to use the below approach.

Hope this will help.

Another abordation it's:

  • You need use String_Split function which exists in Text extension.
  • You need to use it like below and String_Split will provide you desired output.



Cheers,
Nuno Verdasca


Manish Jawla wrote:

Hi Dhiraj,

In case of csv then try to use the below approach.

Hope this will help.

Hi Manish,


I tried this, but how will i store the comma seprated data into entity,

I need complete record.


Hi Dheeraj,

That is pretty simple, you have comma separated list available to you.

Now, you can use split string(newline() as delimiter) and process each row by again using split string(using comma as delimiter) but take special care for empty values, assign values to record type variable and create record in db.

Regards,

Manish Jawla