Tapas Kumar (Tapask99)
Application Development Senior Analyst
Tapask99 Member since 2017 3 posts
Posted: 4 weeks ago
Last activity: 3 weeks 6 days ago
Posted: 24 May 2021 9:46 EDT
Last activity: 25 May 2021 14:44 EDT

Facing "Exception of type 'System.OutOfMemoryException' was thrown." while opening/saving the file using excelConnector

Hi Team,

Hi Team,

I am facing an issue in UAT environment where I am downloading files from sharepoint copying them in local directory. Then i am performing copy operation i.e. I am copying 19rows from one file and pasting it to another Final file. So Final file already has around 60000 rows in it and when I am trying to copy the data and save it . It is showing this exception "Exception occured with Exception: Exception Type: Pega.Exceptions.BaseApplicationException Message : Error saving 'D:\Robots\wsapp15025_11\DRA_CreditCollectionDashboardDailyBot\Files\Output\QCPCreditCollectionReport\Siebel Dashboard Data.xls' workbook. Exception of type 'System.OutOfMemoryException' was thrown. Time Stamp : 24/05/2021 9:13:58 PM Source : OpenSpan.Office.Excel Method : Void InternalSave(System.String, OpenSpan.Office.Excel.LoadSaveOptions) Stack Trace: at OpenSpan.Office.Excel.ExcelWrapper.InternalSave(String fileName, LoadSaveOptions options) at OpenSpan.Office.Excel.ExcelWrapper.Save(String fileName, LoadSaveOptions saveOption) at OpenSpan.Office.Excel.ExcelConnector.Save() Inner Exception Information System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapacity(Int32 value) at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.IO.BinaryWriter.Write(UInt16 value) at GemBox.Spreadsheet.Xls.CellRecordHeader.Write(BinaryWriter bw) at GemBox.Spreadsheet.Xls.XLSDescriptors.FormatHelper(BinaryWriter bw, Object[] format, Object[] args, Int32& currentArgIndex) at GemBox.Spreadsheet.Xls.XLSDescriptors.Format(Object[] format, Object[] args) at GemBox.Spreadsheet.Xls.XLSFileWriter.CreateCellRecord(ExcelWorksheet worksheet, UInt16 row, UInt16 column, UInt16 styleIndex, Object cellValue, ​  formula, ArrayList& extraRecords) at GemBox.Spreadsheet.Xls.XLSFileWriter.CreateCellRecordIfNeeded(ExcelWorksheet worksheet, Int32 sheetIndex, Int32 row, Int32 column, Int32 currentCellsCount, ArrayList& extraRecords) at GemBox.Spreadsheet.Xls.XLSFileWriter.WriteWorksheetRecords(AbsXLSRecords _records, Int32 sheetIndex, ExcelWorksheet worksheet) at GemBox.Spreadsheet.Xls.XLSFileWriter.WriteRecords() at GemBox.Spreadsheet.Xls.XLSFileWriter.GetRecords() at GemBox.Spreadsheet.XlsSaveOptions.(ExcelFile , XLSFileWriter , Stream ) at GemBox.Spreadsheet.XlsSaveOptions.Save(ExcelFile excelFile, Stream stream, String path) at GemBox.Spreadsheet.SaveOptions.(ExcelFile , String ) at GemBox.Spreadsheet.ExcelFile.Save(String path, SaveOptions options) at OpenSpan.Office.Excel.ExcelWrapper.InternalSave(String fileName, LoadSaveOptions options) and Message: Error saving 'D:\Robots\wsapp15025_11\DRA_CreditCollectionDashboardDailyBot\Files\Output\QCPCreditCollectionReport\Siebel Dashboard Data.xls' workbook. Exception of type 'System.OutOfMemoryException' was thrown. "

Can anyone help me resolving this issue ? I am using pega robotics 19.1.43 version

***Edited by Moderator Marissa to update Content Type from Discussion to Question***
Pega Robotic Process Automation Robotic Process Automation Communications and Media Senior System Architect