Hello,

this is exactly what i would like to save and reopen. But i did'nt
find the source which explains how to save
an document with these formattings.
However, i was able to open a spread with a different background
colour.
..........................
Sheet sheet = SpreadSheet.createFromFile(file).getSheet(0);
CellStyle st = sheet.getCellAt(i, j).getStyle();
String co = st.getBackgroundColor();
colo = Color.decode(co);
.......here i set the colour in my custom Java spreadsheet
component.............

I would have expected for the fonts to find a similar method.
For instance something like st.getFont().....
So it would be interesting how to read out the font properties for
example (which method?)

And vice versa i would like to save the font properties of my Java
spreadsheet (and the background colour)
to an OpenOffice spreadsheet file.

At the moment i save the data with:
...................
TableModel model = new DefaultTableModel(data2, head);
Sheet sheet=SpreadSheet.createEmpty(model);
sheet.saveAs(new File(file));
.................

Is there another way to save the data with font properties etc.?

In my custom Java spreadsheet component i can adjust the background
colour,
gridline colour and the font properties (font family, style, size)
which i would like
to save and reopen again in and from an OpenOffice file.

Again any help is appreciated

Best regards

Marcel



Reply via email to