Solved

No of columns in csv file

Posted on 2011-02-24
8
371 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
Comment Utility
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
Comment Utility
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
Comment Utility
"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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 6

Author Comment

by:anushahanna
Comment Utility
it is microsoft access. the code loops through each record and puts data into tables..
0
 
LVL 32

Assisted Solution

by:Stefan Hoffmann
Stefan Hoffmann earned 250 total points
Comment Utility
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
Comment Utility
@anushahanna

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

Author Comment

by:anushahanna
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

11 Experts available now in Live!

Get 1:1 Help Now