ContributionsMost RecentMost LikesSolutionsProblem with writing to Excel in Python We just migrated to the latest version of TestComplete. I have a ton of complex code that works great until I write to an excel file. if itemswebpage == itemsexcel: Log.Message('Group is as expected: ' + str(itemswebpage)) excelFile = Excel.Open(Project.Variables.LogFile) # excelSheet = excelFile.SheetByTitle["2022"] # excelFile = Excel.Open("C:\SVN_Test\Mark's\CheckProcessing\Doc & Data\ManualCheckLog.xlsx'" excelSheet = excelFile.SheetByTitle["2022"] # Write the obtained data into a new row of the file RowIndex = excelSheet.RowCount This code has always worked fine. The python codes compares two lists and when they are the same we write to a file. And it blows up with this message. Excel internal error 'Error while removing a file (The process cannot access the file because it is being used by another process. ).'. 13:16:59 Normal 1.59 AttributeError: 'NoneType' object has no attribute 'SheetByTitle' 13:24:05 Normal 425.45 RowIndex = RowIndex+1 excelSheet.Cell["A", RowIndex].Value = DDT.CurrentDriver.Value[37] excelSheet.Cell["B", RowIndex].Value = "Check Details Passed" excelFile.Save() return True SolvedRe: Programming Around A Screen Saver Of course I do. I work for an Agency that controls that type of thing. Programming Around A Screen Saver I tried two different methodologies. i have a routine that moves the mouse occasionally. Each loop in my process. I then call this simple routine. ========================== def MoveMouse(): Sys.Desktop.MouseX = Sys.Desktop.MouseX + 1 ======================== As well as Win32API.SystemParametersInfo(Win32API.SPI_SETSCREENSAVEACTIVE, False,"Null",0); ======================= In theory they should work. They do not. I get no error. Re: Using DDT.CurrentDriver.Value and updating spreadsheet Thanks so much for your accurate and timely response. Yes that is what I am currently doing -the users want the spreadsheet I am reading from to be updated Using DDT.CurrentDriver.Value and updating spreadsheet I am using DDT.currentdriver to retrieve data successfully How do I write (update) to the same file I am reading from. - "To indicate success or failure" SolvedEdge with compatibility mode As stated, we must be able to use Edge with compatibility mode since this has become our company standard. We realize that the UI is outdate and have plans to upgrade but have not been able to determine when we will be able to do this. With scripts, we can open the browser window, load the test URL and log into test system by entering the user ID and password into text boxes on the page and clicking on a ‘Log in’ button. It is only after we are logged into the system that we are no longer able to see any objects in the browser window. Group policies are applied based on the address displayed in the browser. That POP UP for Version 15 is Annoying I am trying to demo and there is no rhyme nor reason to getting rid of it. Re: Making DDT.CurrentDriver A Bit More Efficient Thanks Again ......yes that what I was hinting at, doing the manipulation in Excel, then I end up mucking with the original data. I was hoping for a Python solution but .....I think you are right. And I as typed a response an alternative that is somewhere in between is using a database solution (Access), SQL Server and then it is one simple select statement. Thanks once again for thinking outside the box. Making DDT.CurrentDriver A Bit More Efficient I am usingDDT.CurrentDriver (PYTHON) -It works fine but loses its way occasionally Reading from a spreadsheet in Loops I read from a the spreadsheet get an EMPID, Check amount and a check date Now that I am later in the year I read multiple times for each individual (EMPIDS) Instead of reading and evaluating once for each month (EMPID, DATE,AMT) I would like to loop through with the EMPID and lookup up all nine values at once. My brain hurts. IN SQL I know how to accomplish this, however in Python (Or a wild manipulation of EXCEL) I would like to only do one pass of the data instead of one for each month. SolvedRe: A Log That Readable and is Pleasant to Read This was never a major issue, however the log is fine. The only problem is that I am looping through and processing records and it is only writing the last file processed. Stated another way, it only writes and does not append