Solved Changing format of a Cell (QXlsx lib)
-
Hi,
I'm using the QXlsx lib to edit an excel file.
The problem is that i can't find how to change the cell format (style and color)
If someone has ever used this lib, help is welcome :)Thx
note : QXlsx doc
-
Hi
I have never used it, but have you tried with
http://qtxlsx.debao.me/document.html#setColumnFormat
and the format class
http://qtxlsx.debao.me/format.html -
I have already tried setColumnFormat() and setRowFormat() and they're working but i need to edit one cell not the whole row/column.
I'll try the = operator, but the cell->format() method do not return a pointer so i think it will not work.Thx
-
Hi
Ok,
Yes, there seems not to be cell->setFormat( myformat);
I would snoop around in the code to get hints :) -
I don't understand why there is format method like setBorderStyle or setBorderColor but you can't get a cell's format.
-
@Zoptune
Well, since you can set format on whole col or row, i do think there be a
setFormat to cell but maybe we just miss something very obvious. :) -
Yep, i found the obvious thing ^^
The write(cell,value) method accepts a third parameter of type Format :) -
@Zoptune
Yes, i saw that, but I though you wanted to edit existing
and write sounded like making new.
Good found :) -
@mrjj
If i just want to edit a cell i need to get the value/format and then use write function (not really efficient way ^^)Thx for help