We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to make particular word bold in the cell


We are using Aspose cell for JDK1.4 in our application.

We have a requirement to make particular word Aspose.jpg (8.6 KB)
BOLD in cell. Attached here the example.

I tried to find it out in Aspose documentation but not able to.

Pls let us know how to achieve it.

Uttam K.


Thanks for considering Aspose APIs.

Please see the following sample code and its generated Excel file. Please also see the documentation article for your reference.


//Instantiating a Workbook object
Workbook workbook = new Workbook();

//Accessing the worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();

//Adding some value to the "B4" cell
Cell cell = cells.get("B4");
cell.setValue("Visit Aspose!");

Font font = cell.characters(6, 7).getFont();

//Setting the font of selected characters to bold

//Setting the font color of selected characters to blue

//Saving the Excel file     

Download Output Excel File:
output Excel file.zip (5.6 KB)

Hi Shakeel,
Thanks for the prompt reply!!!

I tried above code but it seems the method is not supported.

Aspose.jpg (11.8 KB)

Uttam K.


Since you might be using some older version for which we cannot help you much. We evaluate issues and help our clients based on latest APIs set only. Anyways, we think you may try to use Cell.setCharacters() method which I think would be available in your older version, see the code segment for your reference that might work with your older version:
Sample code:

Font myfont = new Font();
cell.setCharacters(6,7, myfont);

Hope, this helps a bit.

Hi Amjad,
This is working fine. Thanks!!!

Uttam K.


Good to know that your issue is sorted out by the suggested code. Feel free to contact us if you have further comments or questions, we will be happy to assist you soon.

Thank you.