Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String uploadedFileName = "sampleFile.xls";
- String propertiesPath = "D:/upload/"; // for local testing
- FileInputStream fis = new FileInputStream(propertiesPath+ uploadedFileName);
- logger.info(fis);
- HSSFWorkbook workbook=new HSSFWorkbook(fis);
- fis.close();
- FileOutputStream out = null;
- try {
- out = new FileOutputStream("D:/download/codeFrame_1.xls");
- workbook.write(out);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }finally{
- out.close();
- out=null;
- }
- fileName = "codeFrame_1.xls";
- fileInputStream = new FileInputStream("D:/download/codeFrame_1.xls");
- logger.info("created new file stream");
- returnvalue="SUCCESS";
- return returnvalue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement