Different styles within one cell

  • Last update:  2021-05-11
  • I. Description

    Multiple data and texts are displayed in a cell by formulas, hoping to change the style of only part of the content, such as: the color of the data obtained by the sum formula becomes red, the color of the text is black, etc. If it is implemented using multiple cells, the format is not easy to adjust and the implementation effect is not good, so the display effect can be achieved through HTML as shown in the figure below:

    1.png

    II. Idea

    Use the formula CONCATENATE to concatenate strings, use the font tag in HTML for string, set the value of color, and set the corresponding cell to Display by HTML.

    III. Example

    1. Open the template

    Open the template: %FR_HOME%\webapps\webroot\\WEB-INF\reportlets\doc-EN\Primary\GroupReport\Vertical_Group_Report.cpt


    2. Enter HTML

    Cell C4 is a simple summary. I hope to splice the region and the total sales volume and set different styles.

    Use the formula =CONCATENATE("<h3><font color=black>",A2,"<font color=red>---",SUM(C3))

    CONCATENATE is to combine multiple strings into one string. Among them, h3 is to define the size of the title, use the font tag to set the color properties black and red, 'A2' is to get the value of A2 cell, SUM (C3) is to sum up the region.


    3. Display by HTML

    Click C4, right-click to select Other, and check Display by HTML, as shown in the figure below:

    2.png


    4. Pagination preview

    Click Pagination Preview, you can see that the regions in the corresponding cell are displayed in black, and the number is displayed in red.

    IV. Download template

    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy