Add composer require to composer.json

hello guys, I am working on the plugin of Librenms that needed composer phpoffice/phpspreadsheet. So, I’m looking a way to retrieve them via composer require command. any guidance would be pleased. Thank you in advance.