jameskleeh / groovy-excel-builder

A Groovy DSL for Building Excel Files
Apache License 2.0
46 stars 14 forks source link

RichTextFormat #35

Closed vvanan closed 4 years ago

vvanan commented 4 years ago

I have to make a cell to accept rich text string. for eg if my string have good then it has to display good in bold. Any solution for this please

kortov commented 4 years ago

How does the "good" string looks in code?

Ashwinits commented 4 years ago

How does the "good" string looks in code?

with html tag for bold

Ashwinits commented 4 years ago

How does the "good" string looks in code?

with html tag for bold So along with applying html styling, need to set font name and size.

jameskleeh commented 4 years ago

I won't be implementing support for html tags in Excel. The breadth of that effort is much larger than I'm willing to take on.

vvanan commented 4 years ago

ok thanks. As of now we are able to use cell().setCellValue() for that purpose.

jameskleeh commented 4 years ago

@vvanan Are you saying that Excel supports HTML tags in cell values? The issue is just that we are assigning it via the string method?

vvanan commented 4 years ago

setCellValue(htmlToRichTextString.formatHtmlString(review.content, workbook)) written a method to preserve richtext format.

kortov commented 4 years ago

@vvanan FYI I guess this lib supports RTF https://github.com/dsl-builders/spreadsheet