Hi,
In my Grails app, I would like admin users to be able to upload a CSV file that contains data such as:
- List of users to be added to system
- List of groups to be added to system
- Assignment of users to groups
I have no idea how the user will generate these CSV files - most likely from Excel, Access or similar, and therefore I've no way of knowing which column will contain which data. So I'm planning to allow the user to specify which column contains users, groups, etc.
I'm wondering if there's a JavaScript component that could help with this. Ideally I'd like to implement the following:
- User uploads file
- In browser, user is shown first N lines of uploaded file and prompted to select the column that contains the users, groups, etc.
- Column information is uploaded to server
Is there a client/server side component that could help with this, or an entirely different approach which would be superior to that outlined above?
I should emphasise that the users of this system will not be technically gifted, so expecting them to provide an XML/JSON file instead is out of the question (and you can definitely forget about asking them to call a Web Service instead of uploading a file).
Thanks, Don