I have an xls spreadsheet that I'm querying using metaModel, and I want to keep the xls file in the jar, because it won't be updated. The method used for creating the data context doesn't allow inputstreams, I tried using this code:
DataContext dataContext = DataContextFactory.createExcelDataContext(getClass().getResourceAsStream("database.xls"));
Unfortunately this doesn't work, as the method createExcelDataContext doesn't take inputstreams as a parameter. Is there any way to keep the file in the jar?
It seems the easiest way to do this is just export to csv, as this is easily done.