我的 word 文件包含形状和图表,其中包含数据字符串。需要获取这些数据。Gembox Document 提供了从页眉页脚和基本段落结构中获取数据的示例。
问问题
103 次
1 回答
1
如果不检查您的文件,没有人可以肯定地说,但是其中包含文本的形状应该是TextBox 元素。
您可以获取如下TextBox
文本:
DocumentModel document = DocumentModel.Load("Sample.docx");
foreach (TextBox textBox in document.GetChildElements(true, ElementType.TextBox))
{
string text = textBox.Content.ToString();
// ...
}
于 2017-09-21T04:50:26.027 回答