StringBuffer stylesooxml= new StringBuffer();
stylesooxml.append(xmlHeader);
stylesooxml.append("<styleSheet xmlns=\"" + xmlns +"\">"); stylesooxml.append("\r\n");
// Now create nodes for various XF elements
AbstractList xfs= bk.getWorkBook().getXfrecs();
ArrayList cellxfs= new ArrayList(); // references various style source elements for ea xf
ArrayList fills= new ArrayList();
ArrayList borders= new ArrayList();
ArrayList numfmts= new ArrayList();
ArrayList fonts= new ArrayList();
// input default fills -- both appear to be required
fills.add(Fill.getOOXML(0, -1, -1)); // none
fills.add(Fill.getOOXML(17, -1, -1)); // gray125
// input default borders element (= no borders)
borders.add(Border.getOOXML(new int[]{-1, -1, -1, -1, -1}, new int[]{0, 0, 0, 0, 0}));
// Iterate the xf's and populate values
for (int i= 0; i<xfs.size(); i++) {
Xf xf = (Xf) xfs.get(i);
addXFToStyle(xf, cellxfs, fills, borders, numfmts, fonts);
}
//** stylesheet element contains an ordered SEQUENCE of elements **//