0

I want to write my existing file to temporary file. I only see strings written into temporary file when I search the internet not actual file.

public static String downloadReport(String filename){
   try{
      File tmppath = null;
      File reportfile = new File(reportPath+filename);
      tmppath = new File("/resources/reports/");
      File tmpFile = File.createTempFile(filename, ".xlsx", tmppath);
      // How do I write reportfile to tmpFile?
 } catch (Exception e) {
        e.printStackTrace();
 }

My file is not a text file. Its an excel file.

0 Answers0