The electricity can flow both ways in a cable, and for example right now Denmark is exporting to most of its neighbours.
https://www.svk.se/om-kraftsystemet/kontrollrummet/ is a wonderful resource
https://www.svk.se/om-kraftsystemet/kontrollrummet/ is a wonderful resource
(Though right now, the SE→DK import is going straight through to Germany.)
It's a Trump-level analysis of the benefits of trade.
Sweden has lots of nuclear and wind both of which can be turned off, but in general it's much better for everyone to sell your excess if you have a willing trade partner and an interconnect. The rest of their grid is mostly hydro which has some amount of storage built in but also sometimes is equally "use it or lose it".