473,426 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

Is that possible of reading the .csv file in column wise and the column have different lengths ?

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 get the output like
coloum 1 :

1
1
1
1
until with in the specific length of only.
What logic i have to use?
2 Weeks Ago #1
1 7099
dev7060
638 Expert 512MB
Is that possible of reading the .csv file in column wise and the column have different lengths ?
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 get the output like
coloum 1 :

1
1
1
1
until with in the specific length of only.
How certain is it the content of the file is present in the correct format? What language, C or C++?

Read line by line.
Use a variable to keep track of the column.
Add number of spaces for index calculation.
Do not process in case of end of line or end of file.
2 Weeks Ago #2

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

Similar topics

8
by: Peter Abel | last post by:
Hi all, I'm working under W2k with Python 2.2.2 (#37, Oct 14 2002, 17:02:34) on win32 I have a file *test_data.txt* with the following content: 0123456789 0123456789 abcdefghi...
4
by: KriZ | last post by:
Can any tell me how to read a File Property like the Title, Subject, Author.. I have tried using a file call "Interop.DSOleFile.dll", it works...but It is not Strong Named... I want something...
3
by: AlanS | last post by:
I am reaing files of different format (PDF, XLS, CVS, XML, HTML). I will take the output and store in in an image field in a database table. The following is the code I am using to read the files....
2
by: PaulR | last post by:
Hi, We seem to have encountered a bug(or working as deigned?) in the import utility on 8.2 LUW. We are using the standard column and char delimiters of , and " while loading files of type...
4
by: Oliver Knoll | last post by:
According to my ANSI book, tmpfile() creates a file with wb+ mode (that is just writing, right?). How would one reopen it for reading? I got the following (which works): FILE *tmpFile =...
11
by: Matt DeFoor | last post by:
I have some log files that I'm working with that look like this: 1000000000 3456 1234 1000000001 3456 1235 1000020002 3456 1223 1000203044 3456 986 etc. I'm trying to read the file...
0
by: krishnarjun | last post by:
hi to all, suppose i created a sql table with one field..........then i inserted 5 records on that table....... if i use datagrid for accessing these records it ll shows all the records row...
12
by: SAL | last post by:
Hello, Is it possible to read a CSV from the Client, and bind my Datagrid to the data in the CSV file without uploading the file to the Server first? I have tried and in Debug mode on my...
4
by: Tom | last post by:
I have a datafile which has a form of 10.10 10.20 10.30 ... 20.10 20.20 20.30 ... 30.10 30.20 30.30 ... .. . . .. . . .. . . it has 500 rows and 10002 colums.
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
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
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...
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: 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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.