How to read upload csv file and read the file and load into Database

Hello,

I have one requirement, I have to upload the file and after uploading, the file is read that file and Loaded into the database.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hello ,

    We have excel tools in the Appmarket. Let me elaborate the steps for better understanding.

    Step 1: Get the plugin form the App Market

    step 2: Create an interface with file upload component and make sure you do not accept any other values than csv and xlsx format to avoid any errors. 

    step 3: Write an expression rule using the function readexcelsheet() and you will need to configure the parameters such as excelDocument, sheetNumber, startRow, numberOfColumns. call this function in a local variable and use the .result notation. ex: readexcelsheet().result 

    Step 4: once you configure the above function you will have to determine how and what columns to be read. Create a cdt to store this data. 

    you will have to index the data into your new cdt using the local variable which contains your data by writing a loop which will run the save casting. by doing this you can get all the data from your excel to cdt.

    step 5: Create a process model which will write the read excel data stored in your cdt to your db.

    I hope the steps will be of help.

Reply
  • 0
    Certified Senior Developer

    Hello ,

    We have excel tools in the Appmarket. Let me elaborate the steps for better understanding.

    Step 1: Get the plugin form the App Market

    step 2: Create an interface with file upload component and make sure you do not accept any other values than csv and xlsx format to avoid any errors. 

    step 3: Write an expression rule using the function readexcelsheet() and you will need to configure the parameters such as excelDocument, sheetNumber, startRow, numberOfColumns. call this function in a local variable and use the .result notation. ex: readexcelsheet().result 

    Step 4: once you configure the above function you will have to determine how and what columns to be read. Create a cdt to store this data. 

    you will have to index the data into your new cdt using the local variable which contains your data by writing a loop which will run the save casting. by doing this you can get all the data from your excel to cdt.

    step 5: Create a process model which will write the read excel data stored in your cdt to your db.

    I hope the steps will be of help.

Children