To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
Unfortunately, you can't. It was a conscious design decision not to duplicate POI API in Spreadsheet. So you need to get the workbook from the spreadsheet, use whatever POI APIs you need to , and then tell spreadsheet to reload the file.