我正在尝试使用Microsoft.Office.Interop.Word从单词.DOC中读取文本
文本有一些温度,例如95°F。
当我从Range.Text获取字符串时,它变为95(F
这是C#代码:
private Microsoft.Office.Interop.Word.Application _wordApp;
Microsoft.Office.Interop.Word.Document wordDocument
= _wordApp.Documents.Open(fileName, false, true);
for (int tableCounter = 1; tableCounter <= wordDocument.Tables.Count; tableCounter++)
{
var inputTable = wordDocument.Tables[tableCounter];
for (int cellCounter = 1; cellCounter <= inputTable.Range.Cells.Count; cellCounter++)
{
var problemText = inputTable.Range.Cells[cellCounter].Range.Text;
}
}