Questions about office addins

Manivannan Nagarajan 5 Reputation points
2024-07-02T10:12:21.02+00:00

Hello,

I'm trying to install the @microsoft/office-js tried with 'npm i @microsoft/office-js' but when importing
import * as Excel from '@microsoft/office-js/excel'; import { Office } from '@microsoft/office-js'; to my js file getting error
ERROR in ./src/components/ExcelInteractive.js 9:0-52

Module not found: Error: Can't resolve '@microsoft/office-js/excel' in '/Users/cibi/Singularium/testing/excel-interactive/src/components'

ERROR in ./src/components/ExcelInteractive.js 10:0-46

Module not found: Error: Can't resolve '@microsoft/office-js' in '/Users/cibi/Singularium/testing/excel-interactive/src/components'

I could see @microsoft folder in the node_modules as per npmjs also tried copying office.js from ode_modules@microsoft\office-js\dist to /assets/office-js/ but that also didn't work

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,014 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,103 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.