Hello,
I would like to upload and parse csv files. I tried to use input object of type file but it gave a javaScript error. I have posted the error in a previous post. Please provide some guidance on how to implement this feature. I did not find any helpful topics in the forum
Thanks,
Nadir Latif
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
How to upload and parse csv files Topic is solved
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to upload and parse csv files
Hi Nadir,
I've responded to your initial post regarding the JavaScript error — feel free to check there for more details.
In this thread, it sounds like your main goal is to upload and parse CSV files after resolving the upload issue. Could you please clarify what kind of parsing you're looking to do? For example, are you aiming to display the data in a table, insert it into a database, or process it in some other way?
Once I understand your use case a bit better, I'll be happy to guide you through the implementation.
I've responded to your initial post regarding the JavaScript error — feel free to check there for more details.
In this thread, it sounds like your main goal is to upload and parse CSV files after resolving the upload issue. Could you please clarify what kind of parsing you're looking to do? For example, are you aiming to display the data in a table, insert it into a database, or process it in some other way?
Once I understand your use case a bit better, I'll be happy to guide you through the implementation.
Re: How to upload and parse csv files
Hi Kevin,
The CSV file contains attendance records. I want to parse the uploaded CSV file, process the data and then store the data in a database table.
The CSV file contains attendance records. I want to parse the uploaded CSV file, process the data and then store the data in a database table.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to upload and parse csv files
There's a function called nuImportUsersFromCSV() in nucommon.php that demonstrates how to process a CSV file and import its data into a database table.
You can tell ChatGPT (or any other AI) what your CSV file looks like—such as the headers and a few sample rows—and also describe your table schema, including column names and types. Based on that, it can help you adapt the code to fit your specific case.
Feel free to ask if you need help or have specific questions!
You can tell ChatGPT (or any other AI) what your CSV file looks like—such as the headers and a few sample rows—and also describe your table schema, including column names and types. Based on that, it can help you adapt the code to fit your specific case.
Feel free to ask if you need help or have specific questions!
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to upload and parse csv files
Just checking in—was that info about nuImportUsersFromCSV() helpful? Were you able to get your CSV data imported into the database successfully? Let me know if you ran into any issues or still need a hand!