dbTalk Databases Forums  

How to export a large dbf file into single workbook

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss How to export a large dbf file into single workbook in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mikhail Ryvkin
 
Posts: n/a

Default How to export a large dbf file into single workbook - 07-22-2003 , 08:52 AM






Visual FoxPro 6, Excel 97
As Excel does not accept tables with more than 16K records, I would like to
save large dbf file to a single workbook split in multiple worksheets. Any
idea how can I do this?



Reply With Quote
  #2  
Old   
wayne dooley
 
Posts: n/a

Default Re: How to export a large dbf file into single workbook - 07-27-2003 , 09:06 PM






All flavors of Fox I've seen thru VFP 7 have a 16K row limit for exporting
DBF to XLS. This has led to many support calls, since for most of our
reports, we have an Excel as well as a Print option.

Some solutions we have come up with

1) Export to Fox2x DBF; Excel can open this (it can have trouble opening
VFP DBFs) and then it can be saved to XLS with the correct # of rows..

2) Export it to CSV. This alleviates the row limit, but beware. If you
have character fields that all numbers, Excel automatically converts them to
numbers. For instance, our products have 7 char catalog numbers, and on
import, Excel will convert 01234 into 1234.

good luck
wayne


"Mikhail Ryvkin" <mryvkin (AT) mathworks (DOT) com> wrote

Quote:
Visual FoxPro 6, Excel 97
As Excel does not accept tables with more than 16K records, I would like
to
save large dbf file to a single workbook split in multiple worksheets. Any
idea how can I do this?





Reply With Quote
  #3  
Old   
Rick Bean
 
Posts: n/a

Default Re: How to export a large dbf file into single workbook - 07-28-2003 , 04:38 PM



Mikhail,
There are a number of "work arounds":
1) Upgrade to VFP 8.0 - it's limit is 65,635 records.
2) Export to CSV format - no limit there and Excel should have no trouble reading it in.
3) Use Automation to write the records directly into the Excel SS.
4) Use this tip from http://www.tek-tips.com/ that was just posted a while back - "How to Export huge Tables to Excel" - thread184-602160":

Hi!

I was trying to export a table with more than 18000 records to excel with File > Export, but when I open the excel file, it only copied 16383 of the records (this appears to be the max value of records that can be exported to excel from my VFP6). So, I have to divide the table, using this procedure:
Select the table
Click "Browse"
Table > Go To Record > Top
File > Export
in "type", you select excel 5....blah..blah...
in "to", you name the file in which the table is going to be exported
Click "Options" and then click "Scope"
Select "Next" and put the number of records you want to export (for example, I used 15000)
Click ok.

When the table is exported, the table pointer will be at the 15000 record. So you use the same procedure above to export the rest of the data (for example, following the same procedure, I used 5000 when I selected "Next").

So, "Next" lets you select a scope of records! From the record in which the pointer is to the number that you type in the "Next" field.

I hope this helps someone,

Cheers!

Lorna.
*---------------------------------------
Rick

"Mikhail Ryvkin" <mryvkin (AT) mathworks (DOT) com> wrote

Quote:
Visual FoxPro 6, Excel 97
As Excel does not accept tables with more than 16K records, I would like to
save large dbf file to a single workbook split in multiple worksheets. Any
idea how can I do this?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.