Getting Values from Excel Spreadsheet using 'Data File' Datasource
-
Hello I am trying to populate data point values using a microsoft excel spreadsheet. So far I have successfully gotten the *.csv file type and corresponding template working. However when testing using Excel *.xls nothing happens. The file is found using the check path button. I have attempted to create the excel file based on the comments in SimpleExcelImporter.java, I have compiled the template. There are no errors but when it is run, nothing happens. Is there an example spreadsheet that can be used as a reference? I suspect that something must be wrong within my spreadsheet or the version (excel 97-2003 workbook) that I have saved the file as.
Any Guidance would be appreciated..
Michael
-
@Integrul Try this file as an example. We use the XML and CSV a lot more than the Excel but hopefully this file will work.Example Excel Data File Import.xlsx
-
Hi Joel, Thanks for the spreadsheet. I am still having trouble with this data source. Actually, I think its making me a bit crazy. It seems like its working, but it still doesn't do anything. Even with the *.xlsx that you provided. I have tried quite a few tests to narrow down the issue. With the csv version of the datasource, using the example csv file in the template directory every thing works, the datapoints are even created if they don't exist. The file is renamed with the Imported_ prefix. As expected. I even tried to purposely use an invalid date format in the csv. This causes errors in the logging console.
"12/10/2014 7:09" is too short at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:873) at MultiColumnCsvImporter.importRow(MultiColumnCsvImporter.java:33)
Great, I figured this could help me diagnose problems within the excel version. However there's nothing in the logging console, even if I put garbage in the *.xlsx. Just that the datasource started. So at least I know the datasource is running. It stops, initializes and restarts if I make changes. But outside of that its not doing anything and I don't know where else to dig.
I even tried to manually create some of the datapoints from your spreadsheet in case there was a problem creating them automatically. They still remain with no data.
I deleted all the 'Data File' datasources, restarted the instance, Re-created only the excel data file source. Same behavior each time. It just basically doesn't do anything. Each time I use the test button to determine the file is found.
I am running mango core 2.5.0 and I Am running version 1.0.8 of the datafile module.
Is there somewhere else I can dig to diagnose this issue? Is there anything in 2.5.2 that might fix this issue? Or am I just crazy?
Thanks for your support
Michael -
@Integrul The excel portion of this was originally developed for a specific client but then we ended up switching from excel to XML which worked much better. It's possible that the Excel portion of the code wasn't really completed and is lacking some logging and error messages. I'm not aware of anyone else using it so it might need more testing. Is it possible for you to use the CSV or XML portion of it or do you really need the Excel portion? If so we can probably review the code and see if we can make some improvements.
-
Hi Joel
Thanks again for the detailed info. At this point we can shelf the excel requirement as we are just working through the best way to bring a simple production schedule and related data into the database. We have also explored the pop3 data source as an option. Our goal is to be compatible with something simple that clients would already have in their workflow. Any suggestions you have would also be greatly appreciated.On the topic of XML do you have an example of an import class that we could use as a test which is based on a simple excel document?
Thanks
Michael