473,671 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a file text file with data and parse

How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.

Sep 28 '07 #1
3 1542
On Sep 28, 9:49 am, cmdolcet69 <colin_dolce... @hotmail.comwro te:
How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.
Look up the StreamReader object, it's ReadXXX() methods, and
String.Split() method.

Thanks,

Seth Rowe

Sep 28 '07 #2
cmdolcet69 wrote:
How do i parse a text file with data value in it? I have a series of
values that are sepereated by commas. the file holds around 3700
values and all these values need to be parsed out and put into an
array to be used.
If you don't know exactly how many values there are, I suggest you put them
into an ArrayList instead because that will expand automatically.

You can always transfer the data from the ArrayList into an Array once you
know the size to Dim the array to.

Andrew
Sep 28 '07 #3
cm,

I thought this was answered before and my answer was, just use oledb with a
dataset and gave this website for the connection string, if you search this
newsgroup on google Paul Clement (or Cor) then you find plenty of stuff
about this.

www.connectionstrings.com
Cor

Sep 28 '07 #4

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

Similar topics

7
1467
by: Kelly | last post by:
I got my other question wrong. I wrote a script that opens a file and filters out email addresses and urls etc. is there a way to enter a url so that my script will open the source of the webpage and NOT the web page itself?
12
7710
by: jacob nikom | last post by:
Hi, I would like to store XML files in MySQL. What is the best solution: 1. Convert it to string and store it as CLOB/text 2. Serialize it and store as byte array 3. Flatten it out and create one column per element, each column is VARCHAR Does MySQL has anything special for XML data? Is there any software which helps to store XML data in MySQL
5
15391
by: mike | last post by:
Is there any way I can change the content type when I open a new window other than opening a script in the open statement? mywin = window.open('','rpt','width=600,height=425,top=50,left=0,scrollbars=yes,toolbar=yes,resizable=yes,dependent=no'); mywin.document.write("Content-type:image/svg+xml"); In this example I would be changing the content type to svg.
3
8718
by: Alessandro | last post by:
Hi all! I'm trying to write a file transfer application using TCP, but I'm having some problem to connect the client and the server. Sniffing with Ethereal I can see the packets sent from the client: SOURCE = 130.237.15.219 DESTINATION = 130.237.15.224 PROTOCOL = TCP; INFO = 1464 > 11115 Seq=0 Ack=0 Win=32768 Len=0 MSS=1460, but there are no packets to reply, and after a while the client program exit with
13
4177
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them from the html page (replace the words in the html page with blank space) I'm new to python and could use a little push in the right direction, any ideas on how to implement this? Thanks!
22
4973
by: fniles | last post by:
I have a .CSV file (comma delimited) that I want to open using OLEDB, but I get the error "External table is not in the expected format." If I save the .CSV file to an .XLS file, I can open the connection with no problem. What is the correct way to open a .CSV file ? If I can not open the CSV file, how can I programmatically save the CSV file to an XLS file ? Thanks a lot. dim myCon OleDb.OleDbConnection
13
3543
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
2
5510
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...
15
5265
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
8390
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,...
0
8911
Oralloy
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...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
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...
0
5692
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();...
0
4222
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...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2808
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
2
1806
bsmnconsultancy
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.