Listbox, Design & Excel requests

Dear all,

I’m slowly getting familiar with Anvil. Finally a nice tool for someone like me who want to create some nice web apps without having to deal with HTML/CSS/JS and design issues.

On my side, I’m looking to create a step by step “survey”. At each step, the user would have to fill the required information (but can still access to the information previously filled). Some stuff that I think would be required on my side:

  1. Small help button which show text when clicked or when the cursor is over.
  2. Listbox allowing to present data and modify data, if needed.
  3. Animated forms/panels (e.g. closing or opening slowly).
  4. Excel file upload/download, specifically for reading/writing the data. In Python, I was using Openpyxl but I don’t think there’s actually a way to use Openpyxl with the current FileUploader component (did not try yet).

Continue your good work!

Alex

Hi Alex,

Great to have you with us! As you kindly organised your points, I’ll respond to each in order:

  1. Small help button which shows text when clicked

The easiest way to do this is to have a Link or Button that opens an alert when clicked.

Here’s an example app (click to make a copy and open it in the Anvil editor). It has a Link component that has no URL, but its click event pops open an alert box with help:

  1. Listbox allowing to present data and modify data, if needed

The standard way of presenting and modifying data in Anvil is to use a LinearPanel and add a series of Forms to it. Our To-Do List tutorial will show you how to do this.

  1. Animated forms/panels (e.g. closing or opening slowly)

This one is definitely a feature request! Can I ask what you want to use it for?

  1. Excel file upload/download, specifically for reading/writing the data. In Python, I was using Openpyxl but I don’t think there’s actually a way to use Openpyxl with the current FileUploader component (did not try yet).

I’ve got good news for you! You can use Openpyxl in Anvil server modules. You just need to pass the Media object you get from the FileLoader into a server module, then write it to a temporary file and use it from there. Here’s a forum post with some example code (it’s using pandas rather than openpyxl, but it’s the same mechanism):

And if you just want to do a one-time import using the Anvil Uplink, here’s some example code for doing just that:



I hope all this helps!

You definitely answered my questions. I’m happy to know that Anvil is already doing most stuff I would need to start my projects.

Regarding the animated forms or panels, let me precise a bit. In my app, I would like the user to enter some data (step by step) using one form. I was thinking at creating for example 5-10 containers and allow the user to pass from one container to the other using buttons which would make the appropriate container visible and the others invisible. On my side, I consider that Anvil would make it works fine, with no functional issue. In modern websites though, we would usually have animations like the following between the containers: https://tympanus.net/Tutorials/FancySlidingForm/.

Thank you again for your assistance in answering my other queries!

Alex