public static void writeToFile(OutputStream fos, InputStream xlsWorkbook, boolean excludeWorkbookRecords, String[] params) throws IOException {
POIFSFileSystem fs = new POIFSFileSystem(xlsWorkbook);
HSSFWorkbook workbook = new HSSFWorkbook(fs);
InternalWorkbook internalWorkbook = getInternalWorkbook(workbook);
DrawingGroupRecord r = (DrawingGroupRecord) internalWorkbook.findFirstRecordBySid(DrawingGroupRecord.sid);
r.decode();
StringBuilder builder = new StringBuilder();
builder.append("<workbook>\n");
String tab = "\t";
if (!excludeWorkbookRecords) {