Closed igortn closed 9 years ago
Thanks for the work, I would be happy to accept it if you could please provide a unit test case for it as well. Also, for extra points, consider extracting another variant of load-workbook that loads from a stream and implementing the other load methods on top of that.
Makes perfect sense. I will do that and resubmit.
Thank you, Igor
On Mon, Aug 17, 2015 at 6:48 PM, Martin Jul notifications@github.com wrote:
Thanks for the work, I would be happy to accept it if you could please provide a unit test case for it as well. Also, for extra points, consider extracting another variant of load-workbook that loads from a stream and implementing the other load methods on top of that.
— Reply to this email directly or view it on GitHub https://github.com/mjul/docjure/pull/35#issuecomment-131985552.
The clean way would be implementing 'load-workbook-as-stream' and deriving both 'load-workbook-as-file' and 'load-workbook-as-resource' on the top of it. Unfortunately, this breaks API backwards compatibility by renaming the currently existing function 'load-workbook'. Do you mind doing that, or you prefer not to change the existing function name?
Please let me know.
On Mon, Aug 17, 2015 at 10:51 PM, Igor Tovstopyat-Nelip igor.tn@gmail.com wrote:
Makes perfect sense. I will do that and resubmit.
Thank you, Igor
On Mon, Aug 17, 2015 at 6:48 PM, Martin Jul notifications@github.com wrote:
Thanks for the work, I would be happy to accept it if you could please provide a unit test case for it as well. Also, for extra points, consider extracting another variant of load-workbook that loads from a stream and implementing the other load methods on top of that.
— Reply to this email directly or view it on GitHub https://github.com/mjul/docjure/pull/35#issuecomment-131985552.
I have pushed another commit with the following:
Please let me know if any adjustments are needed.
The existing load-workbook function has a file name as a parameter. In the case when the workbook is attempted to be loaded from a file on a classpath, which is a typical case for application servers, the server does not have access to the file system, and the FileNotFound exception is thrown.
The new function uses a named resource, instead of a file name, to load the workbook.