Received : 2007/12/08 18:03:39
Message : hi,
I have to change the Font Style of a particular cell in my Xls file using apose.cell in .Net
I want to Keep that cell as bold. Please guide me how should I do it
This message was posted using Aspose.Live 2 Forum
Hi,
Thanks for considering Aspose.
Please use Cell.Style.Font attributes for your need.
May the following sample code help you for your need.
Workbook workbook = new Workbook();
workbook.Open("d:\\test\\Book1.xls");
//Get the first worksheet in the workbook.
Worksheet sheet = workbook.Worksheets[0];
sheet.Cells["A1"].Style.Font.Color = Color.Red;
sheet.Cells["A1"].Style.Font.IsBold = true;
sheet.Cells["A1"].Style.Font.Name = "Verdana";
//Save As the workbook.
workbook.Save("d:\\test\\MyBook.xls");
For further reference, please check:
Thank you.