Re: Pull data from Txt file?
Please provide the actual format of the file, otherwisd we're just guessing.
1 Attachment(s)
Re: Pull data from Txt file?
Here is an example of the txt. I want to lay this out as if it where in excel so I can do conditional formatting, etc.
Re: Pull data from Txt file?
First create object where you'll store data from the file.
Next read each line(with TextReader) and add in appropriate property in object.
Re: Pull data from Txt file?
I honestly have no clue how tO do that. Any chance you can provide code?
Re: Pull data from Txt file?
Quote:
Originally Posted by
sentinelace
I honestly have no clue how tO do that. Any chance you can provide code?
Here buddy: http://msdn.microsoft.com/en-us/library/db5x7c0d.aspx
Re: Pull data from Txt file?
I see two boxes of code. None that specify where the txt file actually resides. Also I need this in form view or any clean view to display on a monitor. A console window will not work.
Re: Pull data from Txt file?
StreamReader("TestFile.txt") - This means the file is in the same directory with application.
In Windows Forms you can select file with OpenFileDialog.
In the example with open file dialog you have how to read content from file and put in stream. At the bottom you have and RichTextBox for displaying results.
Re: Pull data from Txt file?
is form view the best option I want to make it look similar to an excel sheet?
Re: Pull data from Txt file?
You can use datagridview in form to display the results.