4

Aim: Copy data row-wise from one excel file to another.

Problem: I've used OpenPyXL earlier to automate such stuff, but have never dealt with a protected sheet earlier. This sheet requires the "validate" button to be pressed upon opening. Only when it has been validated, the "Add New Row" button works. Is there any way I can imitate clicking these buttons when copying data. Open to using different excel integration modules.

Note: A few columns in the sheet are "Auto Populating." This auto-population only works when I click the "Add New Row" button after filling in each row.

PS: I have access to the Protected VBA Code, but I have no experience with VBA. I can try running the macro that is supposed to be run when the button is clicked, but I don't know how to do that too.

The "VBA Buttons"

3
  • if you know which function is running on clicking the button, i believe you can run that function from python, you don't have to click the button. Commented Aug 8, 2020 at 16:45
  • This will probably help: stackoverflow.com/questions/46374578/… Commented Apr 29, 2021 at 14:59
  • 1
    Hi. Did you get any solution for this? I have exactly the same problem. Having some protected Macros in VBA even hacking and copying those codes did not work. So I have to tell my Python code to click that button for me! Commented Sep 4, 2021 at 21:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.