简体   繁体   English

如何使用Openxml将段落垂直和水平对齐,例如MS单词?

[英]How to align paragraph verticaly and horizontaly like MS word using Openxml?

I would like to align paragraph that i am passing as table to word document using open xml as vertically and horizonaly like as MS word does. 我想像MS word一样使用开放式xml将我作为表格传递给Word文档的段落与垂直和水平对齐。

在此处输入图片说明 how can i do this? 我怎样才能做到这一点?

I have solved by my own with use of ParagraphProperties and TablecellProperties of openxml wordprocessing class. 我已经使用openxml文字处理类的ParagraphProperties和TablecellProperties解决了我自己的问题。 To align Vertically, I have used TablecellProperties to vertically align and ParagraphProperties to horizonal align and TextRotation. 为了垂直对齐,我使用TablecellProperties垂直对齐,使用ParagraphProperties进行水平对齐和TextRotation。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用OpenXml.Wordprocessing和C#在MS Word中创建自定义样式链接的(段落和字符) - How to create custom style Linked (paragraph and character) in MS Word using OpenXml.Wordprocessing and C# 如何使用OpenXml将新书签附加到Word 2010中的现有段落? - How to attach a new bookmark to an existing paragraph in word 2010 using OpenXml? 如何使用OpenXML SDK获取MS Word中超链接的绝对URI? - How to get absolute URI of hyperlink in MS word using OpenXML SDK? 使用OpenXML将文本替换为MS Word中的等式 - Replace text to equation in MS Word using OpenXML 如何将Microsoft Word文档节或段落设置为仅使用DocumentFormat.OpenXml进行读取 - How to set Microsoft Word document section or paragraph to read only using DocumentFormat.OpenXml 在使用OpenXML通过c#代码编辑Word文档文件时,如何将样式应用于段落? - How to apply style to a paragraph while editing a word document file through c# code using OpenXML? 我想使用openxml在现有段落或文字中添加超链接 - I want to add a hyperlink to an existing paragraph or text in word using openxml 如何使用OpenXml(MS Word)获取绘图的图像ID? - How to get an image id of a Drawing with OpenXml (MS Word)? Word,VSTO,OpenXml-将XML插入到Paragraph对象中 - Word, VSTO, OpenXml - Inserting XML into Paragraph object 如何使用 OpenXML Sdk 替换段落文本 - How to replace an Paragraph's text using OpenXML Sdk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM