Free Support Forum - aspose.com

Combining regular and superscript text

Hi,

i just want to now can i combine regular and superscript text in one cell? For example, in my document i store physical values (like square meters) , and i don't like when it looks like '14 m2'. I would like to have power as superscript text and other text as regular at the same time.

Thanks


This message was posted using Aspose.Live 2 Forum

Hi,

Hi,

Please check http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/formatting-selected-characters-in-a-cell.html

Please try the following codes:

Cells cells = workbook.Worksheets[0].Cells;
cells["A1"].PutValue("14 m2");
Characters chs = cells["A1"].Characters(4, 1);
chs.Font.IsSuperscript = true;

Thanks Warren!