Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Excel

Cannot open the DBF created from the SaveAs option of Excel

 
Jump to:  
 
DPM
PostPosted: Thu Jul 24, 2008 5:57 am    Post subject: Cannot open the DBF created from the SaveAs option of Excel
       
Hi,

I have an Excel sheet with 150 columns and 8 rows of data, when I use the
SaveAs option under the File menu of Excel with Type DBF4, it creates the
dbf file with no errors. But when I try to open the file from VFP, it
indictaes the following error and cannot be opened.
"Table 'H:\Book11.dbf' has become corrupted. The table will need to be
repaired before using again."

But if I reduce the width of the columns in the Excel and then save it as a
DBF, it is possible to opend the table even with 150 columns from VFP.
The limit in VFP is a max. of 254 fields and max. no. of characters per
record is 65500.

Further figured out that the DBF created from Excel can have a maximum of
3999 characters for it to be opened from VFP.

I am using MS Excel2003(11.6560.6568) SP2 and VFP9 SP1
Even programmatically using the Excel.SaveAs() from VFP causes the problem
Each column in the Excel sheet is 27 points when it fails, but with 26
points it suceeds.

Could someone please advice how to avoid this problem and create a DBF with
data from Excel.
 

 
DPM
PostPosted: Thu Jul 24, 2008 8:09 am    Post subject: Re: Cannot open the DBF created from the SaveAs option of Ex
       
Hi Pete,

Then the VFP table does not get the proper field types and field length as
it is converted into text intermediately.



"Pete_UK" <pashurst@auditel.net> wrote in message
news:606f6210-7d57-4269-af9b-7f4bce7eb6b1@k13g2000hse.googlegroups.com...
Have you tried saving it as a .csv instead, and importing that into
VFP?

Pete

On Jul 24, 8:45 am, "DPM" <a...@bb.cc> wrote:
Quote:
Hi,

I have an Excel sheet with 150 columns and 8 rows of data, when I use the
SaveAs option under the File menu of Excel with Type DBF4, it creates the
dbf file with no errors. But when I try to open the file from VFP, it
indictaes the following error and cannot be opened.
"Table 'H:\Book11.dbf' has become corrupted. The table will need to be
repaired before using again."

But if I reduce the width of the columns in the Excel and then save it as
a
DBF, it is possible to opend the table even with 150 columns from VFP.
The limit in VFP is a max. of 254 fields and max. no. of characters per
record is 65500.

Further figured out that the DBF created from Excel can have a maximum of
3999 characters for it to be opened from VFP.

I am using MS Excel2003(11.6560.6568) SP2 and VFP9 SP1
Even programmatically using the Excel.SaveAs() from VFP causes the problem
Each column in the Excel sheet is 27 points when it fails, but with 26
points it suceeds.

Could someone please advice how to avoid this problem and create a DBF
with
data from Excel.
 

 
Pete_UK
PostPosted: Thu Jul 24, 2008 8:52 am    Post subject: Re: Cannot open the DBF created from the SaveAs option of Ex
       
Have you tried saving it as a .csv instead, and importing that into
VFP?

Pete

On Jul 24, 8:45 am, "DPM" <a...@bb.cc> wrote:
Quote:
Hi,

I have an Excel sheet with 150 columns and 8 rows of data, when I use the
SaveAs option under the File menu of Excel with Type DBF4, it creates the
dbf file with no errors. But when I try to open the file from VFP, it
indictaes the following error and cannot be opened.
"Table 'H:\Book11.dbf' has become corrupted. The table will need to be
repaired before using again."

But if I reduce the width of the columns in the Excel and then save it as a
DBF, it is possible to opend the table even with 150 columns from VFP.
The limit in VFP is a max. of 254 fields and max. no. of characters per
record is 65500.

Further figured out that the DBF created from Excel can have a maximum of
3999 characters for it to be opened from VFP.

I am using MS Excel2003(11.6560.6568) SP2 and VFP9 SP1
Even programmatically using the Excel.SaveAs() from VFP causes the problem
Each column in the Excel sheet is 27 points when it fails, but with 26
points it suceeds.

Could someone please advice how to avoid this problem and create a DBF with
data from Excel.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Kwiaty mieszkanie wrocƂaw ƛmieszne teksty dziaƂki budowlane WebCatalog Stron - wielkopolskie