用java在IE中打开Excel
用java在IE中打开Excel
public class TestOpenExcel extends HttpServlet { private static final String url = "D:/test.xls"; /** /** ServletOutputStream sos = response.getOutputStream(); FileInputStream fis = new FileInputStream(url); BufferedOutputStream bos = new BufferedOutputStream(sos); bos.write(bytes, 0, fis.read(bytes)); fis.close(); sos.close(); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } } |