Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2008, 07:45 AM
DPM
 
Posts: n/a
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.



Reply With Quote
  #2 (permalink)  
Old 07-24-2008, 08:52 AM
Pete_UK
 
Posts: n/a
Re: Cannot open the DBF created from the SaveAs option of Excel

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:
> 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 asa
> 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.


Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 09:57 AM
DPM
 
Posts: n/a
Re: Cannot open the DBF created from the SaveAs option of Excel

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:
> 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.



Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:29 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Loan | Mortgages | Consolidate Debt | Problem Mortgage | Loan



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147