473,836 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Read and display specific data from text file into listbox using VB 6

Mas Juliza Alias
67 New Member

I am building a program on Information System for Reservoir Operation for my Masters research. Now I have a text file which is an output file from a processing software (Terramodel) that lists out Elevation Range and Volume in columns and rows. The text file looks like this;

-software's distributor address-
-project description-

Depth range Volume
(m) (m3)
0.000 > 0.001 10.0
0.001 > 0.002 12.0
. .
. .
. .

cummulative volume

now i've written the code to display the data in listbox using AddItem, but the whole lines are displayed in one single line in the listbox. I want to display only the Depth Range and Volume data, starting from '0.000 > 0.001'. So, how to skip reading the file header (software's distributor address & project description) and the data column's header (Depth range (m) & Volume (m3))?

Thank You for your time.
Sep 24 '10
21 10154
Mas Juliza Alias
67 New Member
the calculated Volume at the first 3 rows are correct, but the following rows are incorrect. they appear as 156.1, 233.5, and 325.2 which they should be 157.0, 234.5, and 326.7 respectively. i went through your codes finding the calculation formula but i don't know how to edit those. sorry for my limited knowledge. can you help me on this?

thank you for your time...
Nov 16 '10 #21
14,534 Recognized Expert Moderator MVP
I have closed this thread to further posting. Once you have received an answer to your first question you should choose the post you feel was most helpful as "Best Answer". Then ask your next question in a new thread.

Having multiple questions in a thread is too confusing both to experts and guests looking for answers to their own questions.

Nov 16 '10 #22

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: sachin10 | last post by:
hi i m sachin, i m new to VB programming.i face some problem regarding the sorting of text file contents using arrays.text file have data in the format as below seq |consumerid|status1|status2|meter no1|meter no2|nameof consumer|routeno 234133210003040002222222222000003333333123098sasdcscasdsadsd9041 231433104000267232222278222000003333333123098shskdfkscasdsade9012 this is the format of text file.there are thosands of records in this...
by: christine0207 | last post by:
Hi, how to generate a fixed length data text file using Scripting.TextStream / filesystemobject.
by: JMG | last post by:
Hi All, I have no idea if this is the correct place to post this question, but I'm hoping so :). My problem is that I have a text file containing 5 sets of passwords on a single line space delimited line, which is used to change passwords on a daily basis via DOS batch files (don't get me started on why we have to do it this way, we just do...>:) ) ie Monpassword Tuepassword Wedpassword Thurpassword Fripassword in passwords.txt
by: RyanS09 | last post by:
Hi- I have read many posts with specific applications of reading in text files into arrays, however I have not been able to successfully modify any for my application. I want to take a text file filled with a tab delimited list of 10 columns (floats) and read it into a 2D array. The length of the columns are all the same, however this will be variable from text file to text file. Any help (starter code or where to read) would be much...
by: JB | last post by:
I'm trying to read a text file, and store the position of a specified line, and then later seek back to that line and start reading again. I'm using simple code like the following: StreaReader sr = new StreamReader("test.txt"); String s = ""; while (S != null) { S = sr.ReadLine()
by: Paul Lemelle | last post by:
I am trying to read in a text file then use the data in the file. I know how to read a file wiht the System.IO namespace: FileRead fr = new StreamReader("data.txt"); Console.Writeline(fr.Readline()); or StreamReader fr = File.OpenText("Data.txt");
by: printline | last post by:
Hello All I need a little help with a phph script to display some specific data from a mysql table. I have a mysql table with 4 columns and 10 rows. I want to display fx. data from row 4, 6, 8 and 10. I can display either the first row or all the rows using the below code: $row = mysql_fetch_array($result) or die(mysql_error()); echo $row. " - ". $row. " <img src=images/arlon.jpg /> ". $row. " - ". $row;
by: MiziaQ | last post by:
How can I delete a row of data from a data/text file in vb6 ? I am using an MSFlexGrid, so the user can select which row is to be deleted. Thanks in advance, MiziaQ
by: rohit | last post by:
Hi All, I am new to C language.I want to read integers from a text file and want to do some operation in the main program.To be more specific I need to multiply each of these integers with another set of integers stored in an array.It would be a great help if you could provide some code for it.I tried the function fscanf but by that I am able to read only the first integer of the text file.Please help me.
by: rahulsapra | last post by:
hello everyone m new to j2me plzz help I have a text file that contains data line by line.. format is : response:<some text><space>Pin:<some text><space>time:<hh:mm:ss> eg response:invalid pin Pin:1111 time:04:04:16
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.