FileDialog dialog = new FileDialog(
Display.getDefault().getActiveShell(), SWT.SAVE);
dialog.setFilterExtensions(new String[] { "*.xls" });
String path = dialog.open();
if (path != null) {
ExcelRenderer renderer = new ExcelRenderer();
byte[] data = renderer.render(results);
FileOutputStream out = null;
try {
out = new FileOutputStream(path);
out.write(data);