We help IT Professionals succeed at work.

How to export foxpro(.dbf) file to excel while records > 65535??

hkgal
hkgal asked
on
Medium Priority
2,940 Views
Last Modified: 2012-05-08
I'm a newbie in Foxpro. I'm more okay with MS Access and Excel so I'd love to process data with them instead of foxpro...

Now I've got a Foxpro database with records totals 100,000. I want to export it to Excel for my further handling, however, as Excel's 65535 records limit, some records are missing...

Are there any solutions kinfly help?
Comment
Watch Question

Commented:
Primary solution is to use Excel 2007 which allows for much more records...

Failing that - export as a csv - but don't open with Excel - import directly into access.  
CaptainCyrilFounder, Software Engineer, Data Scientist

Commented:
Export to CSV or TXT file delimited or fixed width. There is no limit in that.

COPY TO myfile.csv TYPE CSV
COPY TO myfile.txt TYPE DELIMITED
COPY TO myfile.txt TYPE SDF

Author

Commented:
I am using Excel 2003 version...

which means I've got to type this command:
COPY TO myfile.csv TYPE CSV

and import the myfile.csv into MS Access?

what if I use: Browse For command to select certain records first and then COPY TO xls?
is it also okay?
CaptainCyrilFounder, Software Engineer, Data Scientist

Commented:
If you are import to access why don't you import directly from a DBF?

Clicl Import from the Access Menu.
Olaf DoschkeSoftware Developer
CERTIFIED EXPERT

Commented:
If you want to copy only certain records, don't browse for ..., copy for ..., browse for will only filter the browse, not the copy, you got to simply use the same for clause with copy to to export only the wanted records.

Bye, Olaf.

Author

Commented:
I tried in Access but there's no dbf file type to select from for importing...so just wondering import it to Excel first. And then go from Excel to Access for further proceeding...

I am quite confused with "use the same for clause with copy to to export only the wanted records.
"?? ya, u got my concern. I can now select some wanted records via BROWSE FOR command. But I don't know how to export the wanted records out to Excel...

pls kindly advise...thanks!
Software Developer
CERTIFIED EXPERT
Commented:
instead of [BROWSE FOR condition] write [COPY TO csv.txt TYPE CSV FOR condition], that's all to it. You apply the same condition on the COPY TO command, that you did apply to the BROWSE command and you only expert the same records.

Bye, Olaf.
Olaf DoschkeSoftware Developer
CERTIFIED EXPERT

Commented:
export
CaptainCyrilFounder, Software Engineer, Data Scientist
Commented:
COPY FOR <logical expression> filters records
COPY FIELDS field1, field2, field2 copies certain fields

I don't have Access 2003 here. I am using 2007 now. I used to import lots of DBF. Maybe they are under dBase.
CaptainCyrilFounder, Software Engineer, Data Scientist

Commented:
Any updates on this?

Author

Commented:
yes. just backed from workplace.
The solution works! Thanks very much!!!

Author

Commented:
very helpful