Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Go Back  Xtreme Visual Basic Talk > > > Text file Tab Delimited Import Visual Studio 2010


Reply
 
Thread Tools Display Modes
  #1  
Old 11-28-2010, 09:25 PM
Sidewinder36 Sidewinder36 is offline
Newcomer
 
Join Date: Nov 2010
Posts: 1
Default Text file Tab Delimited Import Visual Studio 2010


Hey I'm trying to input a text file that's tab delimited that looks something like this.
2.2 5.6
3.7 9
1.2 9.1
8.4 5.2
2.5 4.55
I want to input this text file into a data grid view then preform basic calculations on it and I'm not exactly sure how to go about this. I want to first input the text file then calculate percent change for each row. So 2.2 to 3.7 then 3.7 to 1.2. The whole column. So if i import 5 columns I want 5 more columns of percent change data. And then show the total percent change for each column. So the added columns of data will have an total percent change row. So i'm really not sure how to completely go about this, but I'm starting out with a textparser.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
Try
Dim reader As New Microsoft.VisualBasic.FileIO.TextFieldParser("C:\test.txt")
reader.TextFieldType = FileIO.FieldType.Delimited
reader.SetDelimiters(" ")
Reply With Quote
  #2  
Old 12-03-2010, 10:53 AM
wildfire1982 wildfire1982 is offline
Senior Contributor
 
Join Date: Jul 2003
Location: Southampton UK
Posts: 801
Default

As you said, I think the first thing you need to do is get all of your data into a suitable data structure such as a list(of single) per column and loop through the data puting items in the first column in the first list and the second in the second etc, going all the way through the file adding all of them.

Once you have all of the data you need, you can then have another loop to work out the percentage changes between each element in columns and storing them in another list. You can then display them in any way you like.
__________________
Chris
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010 Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
 
Text file Tab Delimited Import Visual Studio 2010
Text file Tab Delimited Import Visual Studio 2010
 
-->