无法读取固定宽度的字段,因为 FieldWidths 为 Nothing 或空

更新:2007 年 11 月

TextFieldParser 无法读取固定宽度的字段,因为 FieldWidths 属性被设置为 Nothing,或该属性为空。

更正此错误

  • 将 FieldWidths 设置为有效值。

请参见

任务

如何:在 Visual Basic 中读取固定宽度的文本文件

参考

TextFieldParser.SetFieldWidths 方法

TextFieldParser.FieldWidths 属性

TextFieldParser 对象