This mod supports Minecraft version 1.18.2 with Forge mod loader, made on Lxazl5770's commission
Use /gamerule exportToClipboard true
or /gamerule exportToFile true
to export the /data command output to the clipboard or file.
The exported file is in the folder .minecraft/export
.