Hello to all
I need to import in PB some data coming from some excel sheets.
I do this:
a cycle that is repeated N times with a FOR in which: I create, read and destroy excel.
The problem is that excel in the task manager does not disappear, and after 10/20 loops the program runs out of memory and crashes because i have 10/20 excel.
I noticed that N copies of excel disappear when I close the windows (not application) why?
What am I doing wrong ?
I attach code
long ll_excel_rows, iii
oleobject lole_excel, lole_workbook, lole_worksheet
for iii = 1 to 3
lole_excel = create oleobject
li_rtn = lole_excel.ConnectToNewObject("excel.application")
if li_rtn <> 0 then
MessageBox( "Error", 'Error running MS Excel api.')
lole_workbook = lole_excel.application.workbooks(1)
lole_worksheet = lole_workbook.worksheets(1)
// Get the cell value
ls_ = lole_worksheet.cells(1,1).value