There are basically two cases:
- When the library belongs to the theme, use
composer
inside the theme folder to install the package. - When the library belongs to a (site) plugin, use
composer
inside the plugin folder to install the package.
The library you want to use looks more like something for a site plugin.
The theme should rather render content, not manipulate it.
As a side note, for importing from Excel into WordPress I had very good experience with using an importer plugin:
The free version has been sufficient for me in may cases.