1

I want to display value in cell as "Total CO2 emission in 2016 is 2 468 Kgs"

I am using setCellValue() function as:

setCellValue("Total CO2 emission in 2016 is " + emission)

I found that there is field SS_SUB here in the documentation, how can I use it?

This post shows how to set partial text bold in a text. But there is nothing to format text with subscript.

Community
  • 1
  • 1
Bharthan
  • 1,458
  • 2
  • 17
  • 29
  • 1
    "But there is nothing to format text with subscript." What about just applying a `Font` having [setTypeOffset](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Font.html#setTypeOffset(short))? Exactly like the example applies a `Font` which is being italic and underlined. – Axel Richter Mar 28 '17 at 15:22
  • Thanks, that works :) – Bharthan Mar 29 '17 at 08:23

0 Answers0