I'm trying to make a PowerPoint add-in using office.js. The add-in is suppose to collect data from an external source and insert a table containing the data into PowerPoint, but I'm facing some trouble inserting the table into Powerpoint. It seems office.js don't have functionality of inserting tables into PowerPoint(only for Excel and Word).
- Is there any other good solution for making an add-in that can solve the problem of inserting a table into PowerPoint?
- Does someone know if Office.js will support inserting tables to PowerPoint in the nearby future?
A code snippet of what I'm trying to do:
function insertTable() {
var table = new Office.TableData();
table.headers = [['Header', 'Header']];
table.rows = [['Entry', 'Entry'], ['Entry', 'Entry'], ['Entry', 'Entry']];
Office.context.document.setSelectedDataAsync(table, {coercionType: Office.CoercionType.Table},
function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.log(asyncResult.error.message);
}
});
}
-->"The enumeration isn't supported in the current host application."