Free Support Forum - aspose.com

Multiple Styles (with size ) within a Single Cell

Hi,

I’m using excel 3.3.0.0

and when try the following
Cell.Characters(0,4).Font.IsBold = true;
Cell.Characters(0,4).Font.Size = 8;

It is setting the font to bold but the size becomes 10 for that cell

But, if I remove the IsBold Line, setting the font size alone works fine.
Other combinations (IsItalic etc.) seems working fine except the size ?

Can u Check up and let me know…

Thanks,

Gopi

Hi Gopi,

I don’t find this problem. Please try this attached fix.

That version (3.3.3.3) took care of it… Thanks for the quick response.

Gopi

Sorry on my oversight… the problem (bug!) is still there, but I made a workaround which seems working !!

Let say, the cellWidth = 20;
and i want the first 4 characters to be bold.

Cell.Characters(0,4).Font.IsBold = true;

and i want all the charecters to have a font size of 8.

Cell.Characters(0,20).Font.Size = 8;

The above line doesn’t work. It puts size 10 on the cell.

Instead, if I do this…
Cell.Characters(0,4).Font.IsBold = true;
Cell.Characters(0,4).Font.Size = 8;
Cell.Characters(5,20).Font.Size = 8;

It works !

Anyother way, you touch this, either it changes to font 10, or the Font Bold is lost
Pls. check. It is not urgent (!) on our side, since it works…

Thanks,
Gopi

Hi Gopi,

It’s not a bug. Your workaround is the right way to set this multi-style cell.

OK. Thanks for the Info. The very nature that I have to set the font size , that too same size , twice for the same cell, made me to think it as a bug !

Gopi