How is your experience with the OutSystems Community?
23
Views
3
Comments
How to load an external JS library (ExcelJS from CDN) on a Reactive Web screen in O11

Hi everyone,

I'm on OutSystems 11 (Reactive Web) and I need to load a third-party JavaScript library — ExcelJS — into a screen so it's available when the screen loads. I'm building a client-side Excel export, and my JavaScript node uses ExcelJS.Workbook().

Library URL I want to load:

https://cdnjs.cloudflare.com/ajax/libs/exceljs/4.4.0/exceljs.min.js

2026-05-21 04-48-12
Deepa Tiwari

Hi @Youcef Mammar kouadri ,

To use an external JavaScript library, download the required JavaScript file or open the official URL in a browser and copy the JavaScript content into the module’s Script section or import it.

Once the JavaScript has been added to the module, include the required script reference on the relevant screen and use the JavaScript functionality as needed.

For detailed implementation guidance and best practices, please refer to the official documentation.

Hope this will help you.

2019-01-07 16-04-16
Siya
 
MVP

@Youcef Mammar kouadri : You can use the client action RequireScript (https://success.outsystems.com/documentation/11/reference/outsystems_apis/system_actions/#Client_RequireScript) to include an external Js.

2023-09-21 12-55-43
SIRAJKHILJI

Hey @Youcef Mammar kouadri 

 Load directly from the CDN

If you don't want to download ExcelJS, use the built-in RequireScript client action. It is specifically suggested in the OutSystems Community for loading external scripts in Reactive Web. 

  1. Open your screen's OnInitialize client action.

  2. Add the RequireScript client action from the System module.

  3. Set its script URL argument to:

    https://cdnjs.cloudflare.com/ajax/libs/exceljs/4.4.0/exceljs.min.js

  4. Publish and test the screen.

Important: Ensure ExcelJS has finished loading before executing new ExcelJS.Workbook(). If your export action runs before the library is ready, you may get ExcelJS is not defined.

For the most reliable setup, use the Required Scripts approach in Option 1, because OutSystems loads required scripts before the screen is rendered. 


Official guide: Use JavaScript Code from an External Library — OutSystems 11

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.