![]() I can't see from the library's documentation how to load and recalculate just a particular worksheet which I figure would be a lot quicker that trying to recalculate the entire file. I've tried using the library and followed the documentation's example to recalculate the entire spreadsheet but this is taking an incredibly long time to recalculate (its been running whilst I typed this which is about 30 minutes and its still going). ![]() However, I've found an Excel library for Python called 'formulas' ( ) that claims to recalculate Excel spreadsheets without the need for Excel being installed and this is an excellent proposition as I then don't need to have Excel installed on my file servers where the Python code runs. Once I've written the data away using OpenPyXL, I can no longer re-read the worksheet again until I have recalculated the sheet and, until recently I could only do this using either Excel or XLWings. The reason I use OpenPyXL to write the changes away is because the worksheet that I read-in contains data referenced through formula from other worksheets (so I have to trace my way back to find the original cells to update). ![]() I have created a utility using Python 3.6 that reads a particular worksheet from the file into memory using Pandas, manipulates the data and then writes the results back to the Excel file using OpenPyXL. ![]() Preamble: I have an Excel spreadsheet file that contains multiple worksheets. ![]()
0 Comments
Leave a Reply. |