473,425 Members | 1,888 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,425 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 6986
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
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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
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...
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...

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.