Excel file is blocked
I have accessing datas from excel but suddenly I am getting error as "excel internal error 'element nit round" And "access to the excel file is blocked, possible because it is open in excel" But excel is closed.
Previously it's executed fine only suddenly it happens for current script which I am working.
May I know the possibility for this error?
Maybe add a step at the beginning of your script to close all Excel instances to be sure you have nothing to interfere during your actual test steps dealing with Excel.
Var excelfile=Excel.Open("") ;
Var excelSheet=excelfile.SheetByTitle("") ;
Here, in Excel we have only open and create methods available.
May I know how to close the application for this Excel method.
// Close all excel instances
var childcounts = Sys.ChildCount;
for(var count=0; count<childcounts; count++)
if(Sys.WaitProcess("Excel", 0).Exists == true)
var processcount = count + 1;
Log.Message("Excel processs count: " +processcount+ " successfully closed");
childcounts = Sys.ChildCount;
var ExcelFilePath = ""+Sys.OSInfo.TempDirectory+""+excelfile+"";
var SheetName = "Sheet1";
// Open the above Excel file through Sys.OleObject
var MsExcel = Sys.OleObject("Excel.Application", "");
var Sheet = MsExcel.Sheets.Item(SheetName);
// Close Sys.OleObject for Excel application
// Select 'No/Don't Save' button
Neither of these statements "excel internal error 'element nit round" and "access to the excel file is blocked, possible because it is open in excel" are standard error messages.
Are you able to provide the exact screenshot of the error messages you are receiving?