[Advanced Excel] Create one excel workbook from multiple excel files created by RecordListToExcel

Forge Component
(66)
Published on 2019-08-27 by Hanno
66 votes
Published on 2019-08-27 by Hanno

ServiveCenter Version 11.0.211.0
ServiceStudio Version 11.6.32 (Build 13558)
Web module

I like to create an Excel using the result of many RecordListToExcel actions.

I do it the following way:

  1. Aggregate 
  2. RecordListToExcel (using 1)
  3. Workbook_open (Using the binary result of 2)
  4. Worksheet_select (Using the Workbook objects from 3)
  5. Workbook_Create
  6. WorkBook_AddSheet ( using the workbook object of 5 and the worksheet object of 4)

This last action gives a "Object reference not set to an instance of an object" error.

Details of the error:

Environment InformationeSpaceVer: 0 (Id=14435, PubId=0, CompiledWith=11.0.211.0)
RequestUrl: https://outsystems-storecentral-dev.ah.nl/KasSaveData2Excel/WebScreen1.aspx (Method: POST)
AppDomain: /LM/W3SVC/1/ROOT/KasSaveData2Excel-15-132298781946139709
FilePath: F:\Program Files\Outsystems\Platform Server\running\KasSaveData2Excel.320344262\WebScreen1.aspx
ClientIp: 10.232.124.182 X-Forwarded-For: 10.41.216.221
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 6976 ('w3wp', Started='28-3-2020 04:06:41', Priv=1248Mb, Virt=2116445Mb)
TID: 7
Thread Name:
.NET: 4.0.30319.42000
Stack:Object reference not set to an instance of an object.
   at ssKasSaveData2Excel.RssExtensionAdvanced_Excel.MssWorkBook_AddSheet(HeContext heContext, Object inParamWorkbook, String inParamWorksheetName, Object inParamWorksheet, Int32 inParamIndexWhereToAdd)
   at ssKasSaveData2Excel.Actions.ActionCreateExcel(HeContext heContext, Byte[]& outParamExcelFileOut)
   at ssKasSaveData2Excel.Flows.FlowUIFlow1.ScrnWebScreen1.CommandDownload(HeContext heContext)
   at ssKasSaveData2Excel.Flows.FlowUIFlow1.ScrnWebScreen1.wt1_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at OutSystems.HubEdition.WebWidgets.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


When I do the same actions on a Excel I read from a file, this action gives no problem.

It looks like the Excel binary created by RecordListToExcel is from a format what is not compliant with the "Advanced Excel" extension. 

What should I do to fix this issue.

I am getting same error . Does anyone know Solution for this ??

Processing Upload...

Hi Hanno

Thanks for your reply. I used the latest version (2.1.25) suggested by you. But getting same error as  "object reference not set to an instance of an object" at WorkBook_AddSheet action . Below is the screen action on export button. As well as attached oml for ref.