Embed your Excel file or PowerBI report in a NetSuite Portlet

XLANS | Learn how to embed an Excel file in a NetSuite portlet

Updated over a week ago

Important note

Microsoft does not allow pivot tables to be manually refreshed in an embedded file. The workaround is for the Workbook owner to first edit the pivot table in the Excel workbook and set it so the tables refresh on open.Right-click on the pivot table and then select "PivotTable Options" from the popup menu. When the PivotTable Options window appears, select the Data tab and check the checkbox called "Refresh data when opening the file". Click on the OK button.

Excel Workbooks are incredibly versatile tools for both analysis and visualization of data. In fact, Excel formulas are now Turing Complete, giving business users the ability to create powerful applications without the need for conventional programming. As such, we often come across customers who have built visualizations or business flow automation apps on top of CloudExtend Excel products. A frequently asked question from these customers is how they can embed these customized workbooks into their NetSuite Dashboard.

Watch the video to see how to Embed Excel Files in action!

Embed your Excel workbooks using the NetSuite portlet. If you don't have Excel files ready to link, utilize the CloudExtend Analytics application to download saved searches and convert them into dashboards, pivot tables, and more.

See the guide here to see it's full capability!📈

Steps to embed Excel in NetSuite

NetSuite allows you to embed custom content on the Dashboard using Custom Portlets. Here, we will guide you through the steps of embedding an Excel workbook from your Sharepoint or OneDrive for Business account in a NetSuite Portlet.

Step 4: Get the Embed Link

Create the Portlet script file

Copy the following SuiteScript code and save it as CeligoPortlet.js (be sure to use the js extension)

Click the dropdown arrow to see the code 👈


* @NApiVersion 2.x

* @NScriptType Portlet

* @NModuleScope SameAccount




* @param {portlet} portlet


function(runtime) {


* Renders CloudExtend Analytics Portlet.


* @param {Object} params

* @param {Portlet} params.portlet - The portlet object

* used for rendering

* @param {number} params.column - Specifies whether portlet

* is placed in left (1), center (2) or right (3)

* column of the dashboard

* @param {string} params.entity - (For custom portlets only)

* references the customer ID for the selected customer

* @Since 2015.2


function renderView(params) {

params.portlet.title = runtime.getCurrentScript()

.getParameter({ name: "custscript1" });// 'CloudExtend Analytics Portlet';

var url = runtime.getCurrentScript()

.getParameter({ name: "custscript2" });

var height = runtime.getCurrentScript()

.getParameter({ name: "custscript3" });

var content = '<iframe width="100%" height="' +

(height || 500) +

'" frameborder="0" scrolling="no" src="' +

url +


params.portlet.html = content;


return {

render: renderView



Upload the script file

  • In NetSuite, go to Scripting > Scripts > New.

  • Hover over the text box labeled “SCRIPT FILE” and click on the + button that appears to the right of it. Use the file picker that pops up, to select the file from your computer and click Save to upload it. The popup will close automatically, once the file is uploaded. Click on the Create Script Record button to proceed.

Configure the Portlet Deployment

  • On the screen that follows, provide a name and an ID for the Portlet. Set the PORTLET TYPE to Inline HTML.

  • Under the Parameters sub-tab, add three parameters for URL, Title, and height as in the screenshot below:

  • IMPORTANT: The parameter IDs that you enter should match the IDs declared in the script file. Make sure to EDIT the script file and update the parameter IDs and SAVE.

  • Under the Deployments sub-tab, enter a Title for the Portlet deployment and click Save.

  • Once the Script record is saved, click on the link to the Deployment under the Deployments sub-tab.

  • Click on the Edit button and select the roles you want this portlet to be available for, under the Audience sub-tab.

  • Under the Parameters sub-tab, you’ll have the option to set the Height of the Portlet as well as the URL of the Workbook.

Get the Embed Link

Get the Embed link for your Excel Workbook

At this point, you need the embeddable URL of the Workbook in your Sharepoint or OneDrive for Business. You can get this by following the instructions in the following link from Microsoft's website.

See the article from Microsoft for the most up-to-date info on obtaining an embeddable URL.
Embed your Excel workbook on your web page or blog from SharePoint or OneDrive for Business - Office Support (microsoft.com)

❗️One important point not to overlook is that you should append the URL generated with the additional parameters &action=embedview&wdbipreview=True&wdAllowInteractivity=True

  • action=embedview presents the workbook as an embedded workbook

  • wdbipreview enables features such as Power View visualizations, PivotTables, and Data Model-based slicers to work in the embedded workbook

  • wdAllowInteractivity=True enables interactivity with filters and Pivot tables in the workbook

Paste the URL into the URL text box and click on Save.

Get the Embed Link to your Power BI Report

  • Publish your Power BI report then open it online via https://app.powerbi.com

  • Go to File > Embed report > Website or portal then copy the first URL and use that as the URL parameter on the script deployment in NetSuite.

Add the Portlet to the Dashboard

Now, navigate to the NetSuite Dashboard and click on the Personalize link at the top right. Then click on the Custom Portlet button (you can learn more about creating a Portlet here on NetSuite's support site).

NetSuite will create a placeholder for the Portlet at the top of the dashboard. Click on the menu icon of the placeholder and select Set Up.

Select your Portlet deployment from the Custom Content popup and click Save.

Users can use the portlet refresh button at the top right of the portlet to always have the most up-to-date version.

🎉 Congratulations! Now you have a fully functional Workbook app on your NetSuite Dashboard.

Did this answer your question?