cell.setEncoding(HSSFCell.ENCODING_UTF_16);
    public static void write(IDataSet dataSet, OutputStream out)            throws IOException, DataSetException    {        HSSFWorkbook workbook = new HSSFWorkbook();        int index = 0;        ITableIterator iterator = dataSet.iterator();        while(iterator.next())        {            // create the table i.e. sheet            ITable table = iterator.getTable();            ITableMetaData metaData = table.getTableMetaData();            HSSFSheet sheet = workbook.createSheet(metaData.getTableName());            // write table metadata i.e. first row in sheet            workbook.setSheetName(index, metaData.getTableName());            HSSFRow headerRow = sheet.createRow(0);            Column[] columns = metaData.getColumns();            for (int j = 0; j < columns.length; j++)            {                Column column = columns[j];                HSSFCell cell = headerRow.createCell((short)j);                cell.setCellValue(column.getColumnName());            }            // write table data            for (int j = 0; j < table.getRowCount(); j++)            {                HSSFRow row = sheet.createRow(j + 1);                for (int k = 0; k < columns.length; k++)                {                    Column column = columns[k];                    Object value = table.getValue(j, column.getColumnName());                    if (value != null)                    {                        HSSFCell cell = row.createCell((short)k);                        cell.setCellValue(DataType.asString(value));                    }                }            }            index++;        }        // write xls document        workbook.write(out);        out.flush();    }