Workaround for bulk importing data into Glide Tables (Python)

Hi all,

Just in case this isn’t common, here’s a workaround I’m using to bulk import data into glide tables (need to use Python).

https://pastebin.com/yHZ0RWVJ

Run the above script in Python and move to an open window with a glide table showing and your cursor in the first column you want to enter data into

Once the script is done, data will be entered in automatically.

You’ll need to extend this to work with the data you want to enter.

Cheers!

11 Likes

This is genius, thanks for sharing.

1 Like

Agreed! This is awesome! I’m definitely going to use this. I love this idea, and will use it in other web-based projects that lack certain automation! Thank you!

Poking around with this. I’m on a Mac using Safari. I ran the script, single-click to select a cell in my Glide table and after 3 seconds I get the “Paste” mouse hover below:

image

If I double-click the Glide table cell (now have the blinking cursor) I see it “pasting” five times, but it’s pasting nothing and not moving to the right (presumably because I’m locked in test edit mode in the cell).

Is this a bug?

That’s interesting! I’m on Windows so I don’t think I can try this out but try a quick test:

If you press command+V once you’re on a cell (and able to move around freely across cells using just arrow keys), does it paste the contents of your clipboard into the cell?

I wonder if this might have to do with the fact that the script uses:

    keyboard.press(Key.ctrl.value)

But Mac’s use command not control, so if you substitute all mentions of “Key.ctrl.value” with “Key.cmd.value”, that might work?