Hi,
dvd.vinay:
A. How to add rich text to comments?
Please see the following sample code for your reference:
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
Comments comments = worksheet.Comments;
int index = comments.Add("B2");
Comment comment = comments[index];
comment.Note = "This is my Comment";
comment.Characters(0, 10).Font.IsBold = false;
comment.Characters(11, 7).Font.Name = "Tahoma";
comment.Characters(11, 7).Font.Size = 15;
comment.Characters(11, 7).Font.Color = Color.Red;
comment.Characters(11, 7).Font.IsBold = true;
comment.Characters(11, 7).Font.IsItalic = true;
workbook.Save("e:\\test\\formattedcomments_chars.xls");
dvd.vinay:
B. How to make a perticular cell invisible? I can't see any property exposed with the cell api?
Well, you need to hide the relative row/column of the cell. For reference, please see the document:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/hidingunhiding-rows-and-columns.html
dvd.vinay:
C. On sheet, there is a column which can have string value or an integer value. I am adding data using putvalue method of the cell api. However cell is automatically adding "Number Stored As Text" message to all the cells where it finds a number. I've already converted the data to string type before adding it to the cell. What else needs to be done to resolve the datatype on the cell.
Do I need to do a type check all the time before adding data and used appropriate "StringValue", or "BooleanValue" etc methods?
Yes, MS Excel will show this message when you have inserted numbers as string. I think you may try to use an overloaded version of Cell.PutValue method, e.g
cell.PutValue(stringval, true); //Please specify
true for the second parameter (bool isConverted).
Thank you.