473,465 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Import data from .CSV file into a 2-d array

1 New Member
Hi-
I need to put data exported from ArcMap as a .csv file into a 2-d array in VB. The file is a 1800x1800 matrix so it is impossible to put it in a worksheet and manipulate it from there. Does anyone know how I could read the .csv into a 2-d array so that I can lookup any value?

Thanks,
Joe
Jul 23 '07 #1
1 2549
Killer42
8,435 Recognized Expert Expert
I need to put data exported from ArcMap as a .csv file into a 2-d array in VB. The file is a 1800x1800 matrix so it is impossible to put it in a worksheet and manipulate it from there. Does anyone know how I could read the .csv into a 2-d array so that I can lookup any value?
I suppose the simplest, though not necessarily the most efficient method, would be to just read the file line by line and use the Split() function to separate it on the commas. This will require more work on your part if you can't guarantee the data values won't also include commas. CSV handles this eventuality easily, but if it is possible you may encounter it, then you may need to actually loop through each line, character by character, and separate the fields yourself.

On the other hand, if you are using VB.Net, it may have added functionality that I'm not aware of, to handle a CSV import.

By the way - is CSV the only format available? If not, what others could you use? For example, tab-delimited data would be just as easy to process, but would overcome any problems of running into commas within the data.
Jul 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David Berry | last post by:
Hi All. I'm looking for any help or sample code that can show me how to make a file import wizard in ASP.NET (VB preferred) like the one that MS Access uses. I'm working on a web site where the...
2
by: musicloverlch | last post by:
I need to import 60 text files all in one folder. Can I use VBA to cycle through all the files, without having to import them one by one? Does anyone have an example? Thanks in advance. Laura
4
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ...
0
by: ramnaresh_t yadav via .NET 247 | last post by:
Hi, I am pasting the code to import data from Text/Excel files into Database(Oracle ) Table... I think some one needs this .. they can use.. it... ======================= Dim dsDB As New DataSet...
2
by: madeleine | last post by:
I'm hoping the answer to this is that I'm just doing something silly, but I'm really scratching my head over this one. I'm importing data from multiple workbooks, each workbook has a sheet called...
6
by: jao.sanien | last post by:
Hi all I was wondering if it was possible to some how import .DAT files into access form? I have over 500 DAT files which contains infomation about various components and I wouldn't want to...
3
by: DONE1 | last post by:
Hello, I am trying to import 4 separate csv files from 4 different servers into an excel sheet.I want to write a macro which will automate this.Also, i want to append the name of the server for each...
6
by: Kanis | last post by:
Hi, I am a Python beginner and using PyCrust to process data for my research work. I found I not able to import a .py file directly. But I have to type in every lines every time. Or I can save...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
3
by: =?Utf-8?B?S3VsZGVlcCBWaWpheWt1bWFy?= | last post by:
Language: C#.NET 2.0 Technology: ASP.NET 2.0 Database: Oracle 10g Hi All, Could any one of you please suggest the BEST method to: 1. Fetch data from a very large .csv file (around 8 MB) and...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
isladogs
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...
0
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 ...

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.