Hello,
i use a excel file as a template for a dataexport. Is there a way to read tge ecisting Stylesheed an modify it bevor i write the file back?
Thanx
Styles styles = (Styles)pkg.getParts().get(new PartName("/xl/styles.xml"));
CTStylesheet st = styles.getContents();
CTXf xf = Context.getsmlObjectFactory().createCTXf();
xf.setNumFmtId( new Long(0) );
xf.setFontId( new Long(1) );
xf.setFillId( new Long(0) );
xf.setBorderId( new Long(1) );
xf.setXfId( new Long(0) );
st.getCellXfs().getXf().add(xf);
st.getCellXfs().setCount(st.getCellXfs().getCount() + 1L);
Users browsing this forum: No registered users and 14 guests