i found this, it looks like it is going to work

Code:
String str = "testing";
byte[] outBytes = str.getBytes();
response.setContentType ("application/x-msexcel");
response.setContentLength(outBytes.length);
response.setHeader ("Content-Disposition", "inline;filename=\"ComputeOrder.csv\"");
byte[] buf = outBytes;
int length = 0;
ServletOutputStream op = response.getOutputStream ();
op.write(buf,0,buf.length);
op.close();