简体   繁体   English

是否可以在没有安装MS Word的情况下生成.docx文件?

[英]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和...

Check This out 看一下这个

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.

相关问题 使用 C# 读取 doc 和 docx 文件,而无需在服务器上安装 MS Office - Reading doc and docx files using C# without having MS Office installed on server 以编程方式创建MS Word文件,而无需安装MS Word - Programmatically create MS Word file without having MS Word installed 无需MS Word自动化即可打印Docx - Printing Docx without MS Word automation 如何从Novacode Docx生成具有HTML输入的word文档 - How to generate word document having HTML as input from Novacode Docx 是否可以在未安装Excel的情况下自动执行Excel? - Is it possible to automate Excel without having it installed? 有没有办法动态生成word文档而无需在机器上有文字 - Is there a way to generate word documents dynamically without having word on the machine 如何在没有安装MS Office的服务器上将docx转换为pdf - how to convert docx to pdf in asp.net without MS office installed on server 是否可以在没有安装 Adobe 的情况下打印 pdf 个文件 - Is it possible to print pdf files without Adobe installed 移动包含字符串的文件,而不必随机生成文件路径 - Move Files containing a String without having to randomly generate the Filepath 未安装MS Office的情况下从Asp.net c#打印Word文档 - Print Word document from Asp.net c# Without MS Office Installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM