If you want to shorten the table leg of an IKEA Lack table, you might want to put an end-cap on the leg after you have sawed it off. The leg is hollow so it will need something to plug the hole and stabilize the leg. This is a 3D printed end-cap that you can download and print on your 3D printer yourself.
This end-cap is press-fit so you won’t have to glue it. Just Use (The) Force and push it in.
The STL and STP files are available from https://github.com/borud/ikea-lack-leg-end-cap