10-25-2016 07:49 AM
This may sound like a stupid question but do you have the file open already when you try to run this code? You can right click on the node and select Ignore Errors inside the Node but I'm not sure if it will still give you a worksheets reference ID out.
10-25-2016 08:01 AM
1st thing - My excel sheet is not open.
2nd thing - I am getting error in invoke node(That is workbook invoe node) and ignoring error in invoke node is not possible. We can ignore only in property node.
10-25-2016 08:14 AM
From Microsoft:
Error 2146827284 Microsoft Excel cannot open or save any more documents because there is not enough available memory or disk space
It could be because Youre running this in a loop as fast as the CPU will allow, and youre in fact not closing your workbook, but only closing the reference. Build in a Close workbook invoke, and it should be fine. (I hope)
10-25-2016 08:27 AM
This error can have different sources but in your case I would guess this is a local ID issue. Is your machine locale set to something else than US English? Have a look at this link.
Also, Sheets Item Index is NOT zero base, this will throw another error. Index of the first sheet of a workbook is 1.
Ben64
10-25-2016 08:35 AM
I tried with different solution mentioned by you all, now it is fixed. Below is my solution. Thanks to all for your help and patience in providing solutions.
Solutions:
1. Excel sheet should be in xls format. I changed my xlsx format to xls format.
2. Changed index of sheet to 1 from 0.
But i need one more small clarification. I there any way of using xlsx format instead of xls format?
10-25-2016 08:36 AM
I would make sure there are no previous instances of excel open from when you were closing your references in the wrong order. You can check by opening task manager, then looking through the processes and aborting all the excel references and trying your code again. I've gotten errors before when there have been previous references still open in task manager when dealing with Excel using active X. Not saying this is the root cause of your error but its a simple check.
10-25-2016 08:44 AM
I generated an xlsx file and opened it using active x with no errors. But this was a fresh blank spreadsheet. There maybe something in your spreadsheet causing this error you are seeing, or your Object Library your have selected for your open active x application is maybe incorrect. Which Library are you using. I believe Excel 2010 using version 14.