Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.47 KB | None | 0 0
  1.   private def embedProgressSheet(slideShow: XMLSlideShow, slide: XSLFSlide, excelFile: File): Unit = {
  2.     for (part <- slideShow.getAllEmbedds.find(_.getContentType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")) {
  3.       if (excelFile.exists()) {
  4.         val in = new FileInputStream(excelFile)
  5.         val partOs = part.getOutputStream
  6.         partOs.write(IOUtils.toByteArray(in))
  7.         partOs.close()
  8.         in.close()
  9.       }
  10.     }
  11.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement