以编程方式从infopath xsn文件获取列表(列详细信息) [英] Getting List(Column details) from infopath xsn file programmatically

查看:96
本文介绍了以编程方式从infopath xsn文件获取列表(列详细信息)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,即用户将在sharepoint在线站点(例如A)的文档库中上载来自不同sp站点的各种列表的infopath模板(xsn文件)。任务是从这些xsn文件中获取列表详细信息,并在上传xsn文件后立即在站点A中创建列表的
副本。

I have a requirement where the user will be uploading infopath templates (xsn file) of various lists from different sp sites in a document library in sharepoint online site (say A). The task is to get the list details from these xsn files and create the replica of the list in site A as soon as the the xsn file is uploaded.

现在根据我的知识列表细节存储在xsn文件中的xml文件中,我们可以通过将xsn文件的扩展名更改为.cab来获得相同的结果。

Now according to my knowledge the list details are stored in xml file inside the xsn file and we can get the same by changing the extension of the xsn file to .cab.

然而为了实现我的目标我会需要使用javascript以编程方式完成。我找到了几种扩展.cab文件的方法,例如使用  Microsoft.Deployment.Compression.Cab
但我需要使用javascript,因为我正在使用sharepoint在线。

However to achieve my goal I would need to do it programmatically using javascript. I found few ways to expand .cab files like using Microsoft.Deployment.Compression.Cab however I need to do it using javascript as I am working on sharepoint online.

我如何实现相同或者是从infopath xsn获取列表详细信息的另一种方式。 

提前致谢

推荐答案

Per my my知识,使用JavaScript无法实现此要求。

Per my knowledge, there is not a way to achieve this requirement using JavaScript.

作为一种变通方法,您可以创建提供者托管加载项并使用C#代码扩展.cab文件和读取数据来自xml文件。以下文章供您参考。

As a workaround, you can create a provider hosted add-in and using C# code to expand .cab files and read data from xml files. The following articles for your reference.

开始创建提供者托管的SharePoint加载项

Get started creating provider-hosted SharePoint Add-ins

https://docs.microsoft.com/en-us/sharepoint / dev / sp-add-ins / get-started-creating-provider-hosted-sharepoint-add-ins

MSFTCompressionCab

MSFTCompressionCab

https://www.nuget.org/packages/MSFTCompressionCab/

最诚挚的问候,

丹尼斯


这篇关于以编程方式从infopath xsn文件获取列表(列详细信息)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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