Vb.net:Word Table 到 Excel 数据传输问题

Vb.net: Word Table to Excel Data Transfer Issue

我可以成功传输数据...我唯一的问题是 Excel sheet 中每个条目中放置的这些奇怪的矩形是什么?

我计划使用基于此 sheet 的信息进行查询,我想知道它们是什么、为什么会发生以及如何摆脱它们。

如果您的内容来自单词 table 单元格,那么它很可能是单词 "end of cell marker" (ASCII 7)

https://support.microsoft.com/en-us/kb/165928

Symptoms

When your Visual Basic for Applications macro returns the number of characters within a range of a table cell, if that range includes the entire cell, the number of characters returned is one more than expected.

Cause

By design, the End of Cell Mark (ASCII character number 7) is returned as part of the text when the cell range is set to include the entire cell. Using the Range.Text property includes the paragraph mark and the end of cell mark (ASCII 13 and ASCII 7) and returns them as a pair.