Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a large text file.
Portion of the file dictates what variables will follow and in what order

# Time
# Depth
# Variable 2
# Var 3
# Var 4

(Following after this, this dictates how many columns)

000 000 000 000 000
000 000 000 000 000
000 000 000 000 000
000 000 000 000 000
000 000 000 000 000
100 200 200 253 245
125 201 202 260 250


What I'm trying to accomplish is that I use streamreader to go through this file and set the variables to the right columns, and then display these into specific text files.

What I have tried:

I can successfully import the whole text file into a text box and I know how to separate each column, but my thing is linking the columns accordingly to the variables above. Each variable does start with the "#" symbol.
Posted

1 solution

A text box is not really suited for your purpose, a DataGridView is a better choice.
See the answer here by Maciej Los here: How to read text file data and display in datagridview with VB.NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900