You might want to see solution posted by https://github.com/victorbrax on https://github.com/xlwings/xlwings/issues/1360