[Advanced Excel] Advanced Excel Error : "object reference not set to an instance of an object"
excel-png
Web icon
Forge component by Carlos Freitas
Application Type
Traditional Web
Service Studio Version
11.14.11 (Build 59394)
Platform Version
11.9.1 (Build 20359)

I converted records list into excel using Record List to excel. I want to add this sheet in to a new workbook.  I tried to add sheet using Workbook_AddSheet action of Advanced excel forge component. But I got the error as object reference not set to an instance of an object.  Attached screenshot for reference.
How to resolve this issue ? Any other alternative to add sheet ? Thanks in advanced!

Advanced Excel error while adding new sheet.png

Hi @Sharad Pawar

Record List to Excel is a built-in action that already creates the excel file, you just need to download it after on your screen / client action.
See a detailed explanation here for both reactive and traditional web:
https://success.outsystems.com/Documentation/How-to_Guides/Data/How_to_Export_Entity_Data_to_Excel

To use advanced excel you should use the component actions to write to the worksheets and then add them to a workbook that you can later download. You probably don't need to use this component if you don't require complex excel manipulation.

Hope it helps, cheers

Bruno

From screenshots its clear that you are getting error in WorkBook_AddSheet method.

Do you tried to add worksheet at the time of workbook creation in Workbook_create method.

Instead of using WorkBook_AddSheet method you can create first worksheet using below method: Just need to pass first sheet name. 

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