Solved

No of columns in csv file

Posted on 2011-02-24
8
398 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

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.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

808 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