Importing Microsoft Excel to Google Spreadsheet using Custom Function with Google Apps Script

This is a sample script for importing Microsoft Excel (XLSX) data to Google Spreadsheet using a custom function with Google Apps Script.
Usage
1. Install SheetJS library.
Please copy the script of the SheetJS library from https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js, and paste the script to the script editor of Google Spreadsheet, and save the script.
In this case, I would like to recommend the following flow.
- Add a new script to the script editor. For example, the filename is
SheetJS. - Copy and paste the script of https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js to the added script file, and save the script.
- Copy and paste the following sample script of the custom function to the other script file (It’s the default script file (
Code.gs)).
2. Prepare custom function.
Please copy and paste the following script to the script editor of Google Spreadsheet (this is the same Spreadsheet installed SheetJS library.) and save the script. And, please reopen Google Spreadsheet.