Reputation: 409
The Excel will exited when I uncomment the expensesTable.showHeaders = false
line.
Excel.run((context) => {
const sheet = context.workbook.worksheets.getItem('Sample');
const expensesTable = sheet.tables.add('A1:E1', true/*hasHeaders*/);
// expensesTable.name = 'ExpensesTable';
// expensesTable.getHeaderRowRange().values = [['Date', 'Merchant', 'Category', 'Amount', 'Amo12unt']];
// expensesTable.showHeaders = false;
expensesTable.rows.add(null, data.slice(0, 10));
if (window.Office.context.requirements.isSetSupported('ExcelApi', 1.2)) {
sheet.getUsedRange()
.format
.autofitColumns();
sheet.getUsedRange()
.format
.autofitRows();
}
sheet.activate();
return context.sync();
})
.catch(console.log);
This problem started yesterday(2018/5/14).
Excel version : Version 1806 (Build10205.20009)
Windiw version :Microsoft Windows [版本 10.0.16299.431]
But This problem does not appear in another PC.
Upvotes: 1
Views: 53
Reputation: 11
I am Tong and I am an engineer at the Excel JavaScript API team. Thank your for letting us know the issue. We have already turn off the flight for the change that caused this issue. So if you restart your excel, the issue should be gone. I apologize for the inconvenience and trouble to you.
Upvotes: 1