Actually, the code is running, my objects of type File get filled up accordingly as I can see through debugging, as well as the proper functionality for the end user. The point is, I'm trying now to retrieve from the uploaded spreadsheets all their contents, and naturally, in human-readable format. My attempt has been through the use of the methods:
filesList.get(i) => filesList is of type List<File>
item.getData() => item is obtained from [[[ UploadItem item = event.getUploadItem(); ]]]
By printing on the console, the results I get are:
Does anyone know how to proceed to obtain the desired data?
Thanks in advance!
DJ aspirant, Engineering undergraduate, Tokusatsus addicted, fond of English language and Asia's, Buddhist, blogger, etc. I'll need to insert all these attributes in a Java class and manage to create methods for handling my overwhelming life
Well, just using the toString() method of a File object (which is what you did) isn't going to do all of the complicated work of extracting the data from that File, recognizing what kind of data it is, and breaking it up into human-readable pieces. That's your job. You have to write suitable code to do it.
Actually, my last message was aimed at thanking for the attention. Truly, the answer "That's your job. You have to write suitable code to do it" is fully known, Paul.
What I need at the moment is some insights on how to proceed with what I've got, tips on how to carry on...
I know there is an API called Apache POI, I have also used it in another test project, successfully reading an Excel workbook on the file system and displaying its contents on the browser. However, I don't see it applicable to my scenario since this time I don't want to read directly from the file system, but rather, to capture the data of the object that contains the Excel content obtained from a previously Excel file upload.
Either you or another comrade, does anyone have a tip for me?
I haven't used Apache POI for a while, but I don't recall that it was limited to reading data from the file system. I would be surprised to find that, in fact. I would expect that it could take its data from an InputStream. So check that out.
The other half of the puzzle would be to get an InputStream from that file upload. I expect that should be a normal thing to do as well. Check that out too.