Solved

No of columns in csv file

Posted on 2011-02-24
8
381 Views
Last Modified: 2012-05-11
is there a limit on the number of columns and data that can be included in a csv file?

I am reading a csv file, and it reads OK till column 28. Column 29-37 is blank (no value) but when i try to read any columns after column # 37, it returns blank, even though there is data.
thanks
0
Comment
Question by:anushahanna
8 Comments
 
LVL 35

Accepted Solution

by:
mccarl earned 250 total points
ID: 34976573
What are you reading it with? This may have some bearing on dropping columns, etc, but to directly answer the original question, NO, there is no inherit limit on the number of columns in a csv file. (Except for possible file size limitations imposed by your OS, but I am sure that you will be no where near that)
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34976607
yes, no space limit issue - the file is 6kb.

access code reads through the csv file and puts it in a table.
i put put dummy values in column 29-39.

29&30 work fine... 31 on is an issue.
0
 
LVL 35

Expert Comment

by:mccarl
ID: 34976627
"access" = Microsoft Access? I presume

So, yeah, I guess Access may have some limitation on the number of columns, or if by "access code" you mean that a VBA type function is loading the file, then maybe there is a limitation in that code.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 6

Author Comment

by:anushahanna
ID: 34976703
it is microsoft access. the code loops through each record and puts data into tables..
0
 
LVL 33

Assisted Solution

by:ste5an
ste5an earned 250 total points
ID: 34978286
A CSV file has no other limitations then space it needs on disk or any other media where you like to save it. Microsoft Access has a 255 column limit per table and query.

http://office.microsoft.com/en-us/access-help/access-specifications-HP005186808.aspx

Thus you cannot import it entirely, if it has more then 255 columns. In such a case you must use multiple steps to import it into multiple tables if you don't normalize the data structure.

Your original problem is normally caused by the fact that Access snoops into the first 10 records to guess the data type. If this guess is wrong, then in columns may appear data which is not readable while not convertible, thus it is null. You need also to take a look at the raw data, if it is a correctly generated CSV and check whether you have given the import wizard a correct specification of it.


mfG
--> stefan <--
0
 
LVL 45

Expert Comment

by:aikimark
ID: 34985609
@anushahanna

please post a copy of the CSV file.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34985668
thanks aikimark; i just saw that the code had a for loop that only went through the first so many columns - that is why the limitation i faced.

thanks all for your guidance, so I was able to revisit this.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run Time Error 3075 15 43
Cross Tab with two column values 7 32
Syntax error [Missing Operator] in query expression 7 24
Excess tables to Excel BackUp 3 28
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now