Excel加载项-console.log在何处输出其消息-NodeJS [英] Excel Add In - Where does console.log output it's message - NodeJS

查看:117
本文介绍了Excel加载项-console.log在何处输出其消息-NodeJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JavaScript API创建Excel加载项.但是我不明白"console.log"在哪里输出他们的消息.所有Microsoft文档都包含console.log示例,但是console.log()输出消息的地方未作解释.我在stackoverflow上找到了类似的帖子,但是这些引用是Visual Studio控制台日志.我正在Mac上用nodeJs编写AddIn,因此对Visual Studio而言,解决方案对我来说是没有选择的.

I am trying to create an Excel AddIn with JavaScript API. But I don't understand where "console.log" outputs their messages. All Microsoft documentations are full with console.log examples, but it is not explained where console.log() outputs the messages. I have found a similar post on stackoverflow, but these refer to visual studio console log. I am writing my AddIn with nodeJs on Mac, so a solution for visual studio is no option for me.

我已经在网上搜索了.我已经搜索了所有Excel选项.我还搜索了"Excel开发人员"选项卡,但找不到任何内容.

I have searched the web. I have searched through all Excel options. I have also searched through the Excel Developer tab, but I can't find anything.

我正在Mac上使用Office 2016(最新).我的AddIn用jQuery编码.

I am using Office 2016 (up to date) on Mac. My AddIn is coded with jQuery.

有人有主意吗?

我已经在NodeJS中创建了ExcelAddin.因此,我已经安装了yo和office-generator npm install -g yo generator-office .然后,我运行了 yo office 命令,并选择了jQuery作为库.样例AddIn起作用.

I have created my ExcelAddin in NodeJS. Therefore I have installed yo and office-generator npm install -g yo generator-office . Then I have ran the command yo office and selected jQuery as library. The sample AddIn works.

推荐答案

默认为com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true

defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true

在终端中输入^后,右键单击外接程序时,可以选择检查元素"(又名Safari Web Inspector).控制台选项卡将显示console.log()语句中的所有已记录消息.

After entering that ^ in a terminal, when you right click your add-in, you'll have the option to Inspect Element (aka Safari Web Inspector). The console tab will show all the logged messages from console.log() statments.

这篇关于Excel加载项-console.log在何处输出其消息-NodeJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆