Importing data from a spreadsheet?

Hi There,

Just wondering how to import data from an excel or CSV into database tables?

Can anybody provide some guidance?

Thanks

Hi @riazahmed2019
If you want to import data from a CSV file on your computer, then you need to upload it first and then read the uploaded file content and insert them in the database.

  1. Upload the file to the server: https://docs.wappler.io/t/uploading-single-file-to-your-server/4231

  2. Add the import CSV step:

  3. For the CSV file path, use the path returned from the upload step:

  4. Add your CSV fields:

  5. Add a repeater step and use the CSV Import step as an expression:
    Screenshot_38

  6. Add Insert Record inside the repeat, so it is executed per row. In the insert record step adjust which CSV field to be inserted in which database field:

5 Likes

@Teodor thanks for the tutorial, it worked perfectly!!!