There is no Python compiler for Excel. You'd need to port the code to VBA.