如何仅将.txt文件中的特定列值过滤到datagridview中 [英] How to filter only a particular column values from a .txt file into datagridview

查看:136
本文介绍了如何仅将.txt文件中的特定列值过滤到datagridview中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要从文本文件中仅提取特定列Mac地址和端口下的特定值。请帮我单独过滤这些价值。



请看下面的例子:



Hi,

I need to extract only particular values below the specific columns Mac Address and Ports from a text file. please help me to filter those values alone.

Please see the below example :

terminal length 0
COE_IPT_ACCESS_SWITCH#
COE_IPT_ACCESS_SWITCH#show mac-address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0100.0ccc.cccc    STATIC      CPU
 All    0100.0ccc.cccd    STATIC      CPU
 All    0180.c200.0000    STATIC      CPU
 All    0180.c200.0001    STATIC      CPU
 All    0180.c200.0002    STATIC      CPU
 All    0180.c200.0003    STATIC      CPU
 All    0180.c200.0004    STATIC      CPU
 All    0180.c200.0005    STATIC      CPU
 All    0180.c200.0006    STATIC      CPU
 All    0180.c200.0007    STATIC      CPU
 All    0180.c200.0008    STATIC      CPU
Total Mac Addresses for this criterion: 43
COE_IPT_ACCESS_SWITCH#
COE_IPT_ACCESS_SWITCH#

推荐答案

请参阅我过去的答案 [ ^ ]。我多次回答过类似的问题。
Please, see my past answers[^]. I answered similar questions several times.


这篇关于如何仅将.txt文件中的特定列值过滤到datagridview中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆