Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
The Style object in NetSuite allows developers to define various attributes such as background color, font size, and text alignment. By customizing these styles, users can enhance the visual presentation of their workbooks, making reports more readable and aesthetically pleasing.
What Are Style Object Members?
The Style object contains several members that define different attributes. Here’s a breakdown of these members:
| Member Name | Type | Description |
|---|---|---|
Style.backgroundColor | string or workbook.Color | Sets the background color of the style. |
Style.backgroundImage | string | Specifies the background image of the style. |
Style.backgroundPosition | workbook.PositionPercent or workbook.PositionUnits | Defines the background position of the style. |
Style.color | string or workbook.Color | Sets the text color of the style. |
Style.fontSize | string or workbook.FontSize | Defines the font size of the style. |
Style.fontStyle | string | Specifies the font style of the text. |
Style.fontWeight | string | Sets the font weight (e.g., bold, normal). |
Style.textAlign | string | Specifies the text alignment (e.g., center). |
Style.textDecorationColor | string or workbook.Color | Sets the color of the text decoration. |
Style.textDecorationLine | string | Specifies the type of text decoration line. |
Style.textDecorationStyle | string | Defines the style of the text decoration. |
How to Create a Style Object
To create a Style object, utilize the workbook.createStyle(options) method. This method accepts an options object where you can specify various properties of the Style object. Here’s an example:
1// Constructing a new Style object2var myNewStyle = workbook.createStyle({3 backgroundColor: workbook.Color.WHITE,4 backgroundImage: 'myStyleImage',5 color: workbook.Color.BLUE,6});Use Cases and Benefits
- Customization: Tailor the appearance of reports and visualizations to match company branding or improve readability.
- Enhanced Visualization: Use various color and background properties to create visually striking reports.
- Server-Side Scripting: These styles can be applied using server scripts, enabling dynamic report generation.
The ability to customize workbook styles enhances the reporting capabilities in NetSuite significantly, fostering better visual communication of data insights.
Frequently Asked Questions (4)
Do I need to use SuiteScript to create a Style object in NetSuite?
Can the Style object be used to adjust text alignment within a workbook?
Is the Style object's fontSize property flexible in terms of units?
What are some specific use cases for customizing workbook styles using the Style object?
Was this article helpful?
More in SuiteAnalytics
- Class, Department, Location Features in NetSuite 2026.1
Class, Department, and Location features enhance financial processes in NetSuite 2026.1 for improved insights and reporting.
- New HTML Formulas in Search for NetSuite 2025.1
New HTML Formulas in Search introduced in NetSuite 2025.1 enhances security for saved searches. Starting in NetSuite 2025.1, the HTML Formulas in Search feature
- Export Pivot Tables to Excel in NetSuite 2024.2
Export Workbook pivot tables to Excel XLSX format starting with NetSuite 2024.2, enhancing data analysis and reporting capabilities.
- Consolidated Reports and SuiteQL in NetSuite 2026.1
Consolidated reports and SuiteQL enhance data access in NetSuite 2026.1. Discover key integration features.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category