I have attached an Excel file in Knowledge store. I need to read the excel file data from Knowledge store in Processes.
The file contents will be in the clb_dms_file_store table ( file_contents column contains the file in binary format )
So your process needs to be able to decode that file_contents somehow - you might find that calling a database procedure (from your process) will be easier than trying to handle it all in the process (i.e. in a GEL script) though. (I'm sure you could handle it in GEL, but database just seems easier to me?)
Thanks for the info.
Do you have any sample gel script code for the above process could you please share with me.
sbhoopalam wrote: Do you have any sample gel script code for the above process could you please share with me.
No sorry - I've only ever done it with XML data (not even XML format Excel documents) stored in the knowledge store, and then via DB procedure rather than GEL (which is why I suggested it )
Gene's suggestions about the apache library(s) to use would be the GEL solution... but I'm well out of my depth when we start going there
To read an excel file with GEL, you will need to leverage the poi.apache.org library either HSSF or XSSF classes depending on the excel format -- xls vs xlsx.
The HSSFWorkbook and XSSFWorkbook class constructors accept a java.io.InputStream so you will need to get the file_contents (Dave's post) into an inputstream.
So on your query against clb_dms_file_store, just get the file_contents blob from the queried resultset and once you have the blog you can pass the an inputstream via the getBinaryStream method on the blob.
Retrieving data ...