Members of my site will have to upload their customers to the Data Base. We are talking about 100 to 200 items, and about 10 fields per item. Uploading this amount of data via a form is not a reasonable option.
On the other hand, all this data already exists on an excel file somewhere on their computer. Surely there must be a way of allowing my members to upload a file and populating the DB with it dynamically? Hours of searching the web and I’ve drawn a blank.
You can let the user upload a csv file and then either use a node package to parse it, or read the file using wix-fetch(fileUrl) and parse it to an array of objects form (I think I posted an answer with example here a while ago, but I can’t find it now. try to search the forum).
If it’s a Google spreadsheet, there’s an NPM for that as well.
Thanks @J.D.
You’ve given me a lead to follow. I’ve got some learning to do now. Much appreciated.
If you do manage to find you’re previous post please let me know. I’ve never used it before so an example will be helpful.
Also, I seem to recall that WIX supports xls and some others but not csv. I must be wrong I guess.
@jonatandor35 Thanks so much J.D.
That great. I will get started on that and hopefully will manage.
How do I find out the url of uploaded files. Where did you get
By the way, you may need to run some more actions: to get rid of some unwanted “\r” or to change the type from string to number and date etc… but all can be easily done with JavaScript.