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
- Transfer Saved Searches to Analytics Warehouse in NetSuite 2026.2
Transfer saved searches to NetSuite Analytics Warehouse in version 2026.2 for enhanced data analysis and improved usability.
- NetSuite Analytics Warehouse Configuration Enhancements 2026.1
NetSuite Analytics Warehouse configuration page redesigned in 2026.1, enhancing usability and resource access.
- Class, Department, and Location Features in NetSuite 2026.1
Class, Department, and Location features improve insights and reporting in NetSuite 2026.1. Introduction With the release of NetSuite 2026.1, Intelligent
- HTML Formulas in Search Enhance Security for NetSuite 2025.1
HTML Formulas in Search enhance security, allowing admins to manage user permissions in NetSuite 2025.1.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category