Hi
I've built a process that looks for emails delivered to a mailbox. Where it finds an email with the correct subject and attachment it opens the attachment (a MS Excel file) and carries out a number of checks/calculations on the data within, sometimes comparing against previously recorded data in a database held on a network share (again a MS Excel file). Depending on whether the checks are passed or not it either saves the file or writes an error report (again using MS Excel)
This all works fine for the first attachment but where it starts to run into problems is after its processed a number of the attachments memory used by automate.exe creeps up and up until the process hangs and I get the error 'Exception when generating display.Exception of type "System.OutOfMemory" was thrown'
The problem is not caused by blank rows in a collection as the process is not importing the excel document into a collection but rather reading cell values using the MS Excel VBO. This is because of the lay out of the data in the Excel file.
The are regular points in the process when moving between different files where Excel is closed and its process stopped/killed .
I've also tried using a 'clear clipboard' action to see if it helps reduce the memory usage but it does not have any discernible affect.
I've not built a queue and shared the work between computers as that would require a human intervention in checking the emails and saving the attachments as inputs files, something that is not desired at this point.
Adding more memory to the computer running the process is probably not practical.
I'd welcome any suggestions as to how resolve this issue 🙂