Solved

No of columns in csv file

Posted on 2011-02-24
8
407 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

749 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