microsoft / python-in-excel

Python in Microsoft Excel
MIT License
490 stars 31 forks source link

File broken by being edited in Current Channel non-beta Excel version #56

Open santiago-afonso opened 4 months ago

santiago-afonso commented 4 months ago

Hello. I've been working with my team on a Python-infused workbook. Two of the team have the beta channel Excel with Python enabled, the third has a Current Channel non-Python Windows Excel version. When the last one edits the file it becomes corrupted.

Afterwards, if one of the Python-enabled users opens the file, we get an this error on open: "We found a problem with some content... Do you want us to try to recover as much as we can?" The XML log generated points to the Python-infused worksheet. The non-Python user didn't edit this worksheet (Python code is confined to that single worksheet). The recovered file has the output Python objects/Python card in the appropriate cells, but the Python code is missing. Ie the card is there but no Python code as can be seen on the screenshot (Python code should be shown in the formula bar).

image

This is extremely problematic for collaboration, ie would preclude us for using Python if this behaviour (which we understand is unexpected) were to continue in the future.

keyur32 commented 4 months ago

Hi @osnofas, Thank you for reporting this issue. We're currently working on enabling Python in Excel to more users in the coming months. For now, would recommend coauthoring on "Python aware" versions, and we'll report back once this is resolved.

keyur32 commented 4 months ago

Hi @osnofas, can you also confirm if the 3rd user on the Current Channel was trying to modify the Python formula, or something else in the workbook when they hit this corruption? Thanks!

santiago-afonso commented 3 months ago

Hi @osnofas, can you also confirm if the 3rd user on the Current Channel was trying to modify the Python formula, or something else in the workbook when they hit this corruption? Thanks!

We keep all of the Python code in a single worksheet. The 3rd user didn't edit that worksheet at all. (Sorry for the delay - I was OOO.)