我跟随此link运行Excel加载项。
我已按照此video配置了localhost,以便Home-simple.html在浏览器中正常运行:
我写了SheetSwitcherManifest-online-3.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
<Id>9475b9bb-ff88-476f-917d-33a9c632508a</Id>
<Version>1.0.0.0</Version>
<ProviderName>Microsoft</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Sheet Switcher - 3" />
<Description DefaultValue="Sheet Switcher - 3" />
<Capabilities>
<Capability Name="Workbook" />
</Capabilities>
<DefaultSettings>
<SourceLocation DefaultValue="http://localhost/Downloads/Excel-Add-in-JS-SheetSwitcher-master/TextEditor/Home-simple.html" />
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
</OfficeApp>
但是,在线上传这个加载项会出错:
有人可以帮忙吗?
答案 0 :(得分:0)
对于DefaultValue="file:///Users/softtimur/Downloads/Excel-Add-in-JS-SheetSwitcher-master/TextEditor/Home-simple.html"
,这肯定是不正确的,因为该文件需要托管在IIS(https://)上,而不是file:// reference。
对于https://localhost:44300/Users/softtimur/Downloads/Excel-Add-in-JS-SheetSwitcher-master/TextEditor/Home-simple.html
,该链接是否可以在浏览器中使用?它看起来很像file://
,前缀为localhost:44300
。您是否将IIS服务器设置为指向C:驱动器的根目录(这会非常不寻常)?将它指向文件夹会更常见,并使地址看起来更像https://localhost:44300/TextEditor/Home-simple.html