[英]Is it possible to generate .docx files without having MS Word installed?
I want to use "OLE automation" (or whatever it's called now) to generate a Word document. 我想使用“OLE自动化”(或现在称之为的任何东西)来生成Word文档。
I assume that it's possible to perform the following programmatically: 我假设可以通过编程方式执行以下操作:
Set page size (height, width, margin vals)
Set font type/name, style, and size
Add page numbering
Add pages
Insert page breaks
What I'm not sure of is if I need to have MS Word on my system to do this (to have the necessary DLLs, perhaps)? 我不确定的是,如果我需要在我的系统上安装MS Word来执行此操作(或许有必要的DLL)? I use Open Office (I like it, and it's free), but I reckon controlling the creation of docs programmatically is probably easier/better documented for MS Word than it is for Open Office and/or Libre Office - that's why I'm strongly considering making this "rendezvous with Redmond."
我使用Open Office(我喜欢它,并且它是免费的),但我认为以编程方式控制文档的创建可能比MS Office更容易/更好地记录,而不是Open Office和/或Libre Office - 这就是我强烈的原因考虑让这个“与雷德蒙德会合”。
This question is tangentially related to this one 这个问题是切向相关的这一个
If Google Docs is a possibility here, I'd be willing to have a "meeting with Mountain View" but I know nothing about that file format or whether it can be "automated" etc. 如果谷歌文档可能在这里,我愿意与“山景城”会面,但我对该文件格式一无所知,或者它是否可以“自动化”等。
I need to end up with something that I can either convert to a PDF file or a DOCX file. 我需要最终得到一些我可以转换为PDF文件或DOCX文件的东西。 Open Office can open DOCX and convert files to PDF, but I don't know about Google Docs.
Open Office可以打开DOCX并将文件转换为PDF,但我不了解Google Docs。
我发现https://docx.codeplex.com/在动态构建docx文档时非常有用。
Yes, it is possible. 对的,这是可能的。 Check this link: http://www.microsoft.com/en-us/download/details.aspx?id=30425 this is a library for open xml documents (*.docx, *.xlsx and powerpoint files)
请查看以下链接: http : //www.microsoft.com/en-us/download/details.aspx?id = 30425这是一个用于打开xml文档的库(* .docx,* .xlsx和powerpoint文件)
yes you can Use Openxml , also with openXml you can create Excel Pdf and ... 是的你可以使用Openxml,也可以使用openXml创建Excel Pdf和...
You can use this library to generate document by template : https://github.com/StasClick/DocumentGenerator
您可以使用此库按模板生成文档: https : //github.com/StasClick/DocumentGenerator
'DocumentGenerator' can generate one leaflet, multiple leaflets in one document or registers. 'DocumentGenerator'可以在一个文档或寄存器中生成一个传单,多个传单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.