Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用spfx在SharePoint web部件中显示SP项附件_Sharepoint_Sharepoint Online_Spfx - Fatal编程技术网

使用spfx在SharePoint web部件中显示SP项附件

使用spfx在SharePoint web部件中显示SP项附件,sharepoint,sharepoint-online,spfx,Sharepoint,Sharepoint Online,Spfx,我正在开发一个SharePoint web部件,它基本上是一个连接到SPO列表的表单。在表单中,我考虑使用一个附件字段让用户附加word或pdf文档。代码中是否有任何内容可供我在表单中显示此附件的内容,或以某种方式打印出文档的内容而无需打开文档?您可以通过在文档的URL中添加文本来使用SharePoint Online Office Web App https://yourDomain/sites/yourSite/Lists/Tasks/Attachments/1/AdventureWorks

我正在开发一个SharePoint web部件,它基本上是一个连接到SPO列表的表单。在表单中,我考虑使用一个附件字段让用户附加word或pdf文档。代码中是否有任何内容可供我在表单中显示此附件的内容,或以某种方式打印出文档的内容而无需打开文档?

您可以通过在文档的URL中添加文本来使用SharePoint Online Office Web App

https://yourDomain/sites/yourSite/Lists/Tasks/Attachments/1/AdventureWorksBikes.xlsx?web=1
或者通过使用文档查看器页面的直接路径:

https://yourDomain/sites/yourSite/sites/yourSite/_layouts/15/Doc.aspx?sourcedoc=/sites/yourSite/Lists/Tasks/Attachments/1/AdventureWorksBikes.xlsx&action=default&mobileredirect=true
如果您想在现有页面中显示上述内容,可以将其放在IFRAME中