我使用VirtalFile.open()
下载了一个excel文件
PDF文件并成功下载和打开。但是问题出在excel文件上。
我正在使用播放框架和Java 1.6
myFile="abc.xlsx";
contentType = application/vnd.openxmlformatsofficedocument.spreadsheetml.sheet";
VirtualFile vf = VirtualFile.open("myPath/docs/img"+ myFile);
InputStream s = new FileInputStream(vf.getRealFile());
response.setHeader("Cache-Control", "max-age=0");
renderBinary(s, myFile, vf.length(), contentType, false);