25
Views
7
Comments
Conversion of CSV file and add data in DB
Question

Hi,

I have CSV file so need to fetch data of only selected header and stored in DB

2024-12-02 13-16-47
Vipin Yadav

Hi @Vivek Pandile,

I don't understand. Could you please explain in more detail so I can help you? If you need an OML file, please let me know. If you're looking to import data into a table, please check the link below. 

https://www.outsystems.com/forums/discussion/89043/how-to-upload-csv-files-to-a-database/

https://www.outsystems.com/forums/discussion/42701/import-csv-file-to-list-reocrd-under-outsystems-11/


Thanks,

Vipin Yadav

UserImage.jpg
Vivek Pandile

I have one CSV file where I have data of A,B,C and D column so I need data of B and D and rest of data ignore and that data would be inserted in entity.

2024-09-12 02-43-38
Deepsagar Dubey

Hi @Vivek Pandile 

Create a structure with two attribute (i.e. B and D in your case)  matched with your excel header, later assign this structure in Record Definition.


now all your excel data persist in structure so you can loop (add validation, if required) and insert data in entity.

I hope it'll help you.

Thanks
Deep

UserImage.jpg
Vivek Pandile

I am using CSV file and how I can matched with CSV header and how I can insert only matching header data.

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

We have used on multiple occasions this great Forge component:

https://www.outsystems.com/forge/component-overview/1392/javascript-utils-o11

Regards,

Daniel

2019-01-07 16-04-16
Siya
 
MVP

If you're okay handling this on the client side, you can use JavaScript to parse the CSV file, extract the required columns, and send the data to the server to insert into the entity using advanced SQL. I've attached a working sample OML for your reference. Please note that the JavaScript and SQL code were generated using AI, so if you plan to use it in production, ensure thorough testing and validation.

CSVDemo.oml
2024-09-16 13-24-51
Inês Oliveira Pestana

Agree with Daniel, this forge component is very useful:

https://www.outsystems.com/forge/component-overview/1392/javascript-utils-o11

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.