$ npm i qq-sheet --save
const QQSheet = require('qq-sheet');
const path = require('path');
const qqSheetUrl = 'https://docs.qq.com/sheet/BqI21X2yZIht1487cQ1mHxFy1TyDtE4E6MIS0zk6GT2sYPhU2IQmKC2Cjyb92FLz9g0PQHVH22S2IO11cq4u0';
// Example 1
const qqSheet1 = new QQSheet(qqSheetUrl, {filepath: path.join(__dirname, 'qqSheet.xlsx')});
qqSheet1.parse().then(xlsxFilePath => {
// An xlsx file will be generated and the file path will be returned.
});
// Example 2
const qqSheet2 = new QQSheet(qqSheetUrl);
qqSheet2.parse().then(qqSheetData => {
// Returns an array in which each item represents a worksheet.
});
- Web pages need to be authorized to anonymous users.
- Because anonymous users can't download documents, we use the method of parsing interface data.