Formating Excel cells with MBS XL plugin? Is it pain in a.s or I do something wrong?

I want just build a nice excel table with different formatting (fonts, different styles of borders in different sides of cell, text and numeric cells and so on). I can do it by making different format styles by book.addformat, but it is ridicules. For example, if I have format for bold text and I want use it in different cells where in one ones I want cell top border be a bold line and in another cell I want use same bold text, but with bottom border do be bold, I can’t do that, as if i change border line occurrence in one cell, it changes all cells that use that bold text format. :frowning:

Realy I must make different formats for every cell!? It’s odd and pointlessly time consuming. With Xojo built in ExcelApplication I can format every cell without problem, but it needs presence of Excel itself in customer computer and therefore is little bit problematic to use…

Thanks for any advice…

You can always use an existing format, make a new sub format and then assign it to a cell.

Yes - I understand that, but it’s very overwhelmed if you want properly format nice looking spreadsheet. There will be literally hundreds of sub formats, as every spreadsheet cell can be just little bit different by it’s format as all little changes - font, border, color, type (text, date, numeric) - needs a new sub format. :frowning:

As I told - formatting spreadsheet with Xojo’s ExcelApplication plugin is pure joy, but with MBS XL plugin - okay - let it be…

Sounds like we may need some helper function, where you pass in the style information and then it creates and returns the right format. Also it could store them in a dictionary if needed to avoid creating them twice.

Yes - I agree. It would be solution, but now I surprised that no one had asked that question before. I just started to make my some older programs to “MS Excel independent” and it is not so easy with MBS XL plugin as I tought. :smiley: But thanks, Christian - regardless of that, MBS plugins are awesome.

1 Like