How to detect and view more than 65,536 rows when opening a DBF

  • Thread starter Thread starter 42N83W
  • Start date Start date
4

42N83W

Excel 2002 SP3
Windows XP Pro

I'd like to be able to open a DBF file where if the DBF has more than 65,535
records that the other records would open on a new sheet in the DBF file. I
know a DBF can have only one worksheet, but this would just be a temporary
thing for viewing only.

Can this be done? Any help or suggestions appreciated.
 
It can be done. One method using VBA would be to:

Import the data into a ADODB.recordset
Use the Count property of the recordset to determine the number of records.
Put the first 65,000 or so records into the first worksheet by looping
through the recordset.
Either create a new worksheet or open an existing worksheet and continue
putting records into it.

Ron
 
Back
Top