gpt4 book ai didi

c# - 如何以编程方式创建 .xsn (InfoPath) 文件

转载 作者:太空宇宙 更新时间:2023-11-03 11:17:00 24 4
gpt4 key购买 nike

我们有一个第 3 方组件,它将 INPUT 作为 .xsn (InfoPath2007) 文件并提供预先确定的输出。一切都很好,直到我们的一位客户决定不再使用 MS-InfoPath,因此即使我们的第 3 方组件也无法运行,因为我们无法创建 xsn 文件(由 human-InfoPath 用户创建,直到现在,直到 InfoPath 在他们的小组中停止使用)...所以我们面临的挑战是以编程方式创建这些简单的(文本框、下拉列表、日期选择器和单选框控件)InfoPath 之类的表单 -- .XSN 文件。这可能吗?是否有任何 API 或基于对象模型的函数可用于此任务。我们的团队主要是 C# 开发人员。我们目前的分析表明,与 .XSN 的 list 、XML、J 脚本部分有关的文件在经过一些仔细的编码后可能是可以实现的……但是 XSL(与布局相关的部分)似乎是一场豪赌。非常感谢有关此主题的任何指示。

UPDATE (as the problem statement does not seem to clear yet):
We do not want to convert InfoPath form into any HTML or alike format. NOW here, we need to create some simple (pre-determined control-types with their known data) InfoPath forms programatically in .xsn file format. We want this to be done programatically, because earlier it was being done by a human-client who no longer subscribes to InfoPath-license and hiring another human for doing this is ruled out for various HR-reasons. So this "programatically"created xsn-file is fed it into this 3rd party component. Then this 3rd party component reads through the various parts inside the xsn-input and manipulates on it, into an output custom-file-frmat such that the custom 'workflow-component' keeps working further ahead... so hope you get the bigger picture now. Now an xsn file is essentially a CAB file consisting of many parts-components like manifest, xsL, xsD, xmL, images, jScript etc. So now if I have a winforms or ASP.NET webform... is it possible to write some component (using InfoPath object model or APIs) which can read through the UI-controls of this winform and then come up with the essentials that need to go into xsL, xmL, manifest etc so as to "collectively get compressed" into an InfoPath form!!!

最佳答案

是的,可以自动创建 InfoPath 模板表单。 XSN 只不过是一个扩展名为 .xsn 的压缩文件 (.CAB)。

要进一步了解 CAB 文件的内容及其作用,请点击以下链接:

A beginner's guide to forms and form templates

以下是可以进一步帮助您的链接。

Microsoft Cabinet Software Development Kit

A relevant Q&A to open CAB through C# program

关于c# - 如何以编程方式创建 .xsn (InfoPath) 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12380000/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com