+ Reply to Thread
Results 1 to 3 of 3

Data in narrow columns truncated when saving as DBF

  1. #1
    Ben Amada
    Guest

    Data in narrow columns truncated when saving as DBF

    I have a requirement to save some data in an Excel file in DBF format which
    Excel can do. However I noticed that if the columns in Excel are not wide
    enough, the data in the columns is truncated when I re-open the DBF file in
    Excel. It's also truncated when I open the DBF file with this other 3rd
    party application. Please note that the amount of text in each column is
    not that much -- maybe 15-25 characters.

    I have to re-type the data, expand the columns to be wider than the actual
    data (so the data is completely visible and then some), then re-save the
    file in DBF format.

    Does anyone know why Excel truncates the data when the columns aren't wide
    enough?? This seems ridiculous that Excel would do that. Also, is there
    any setting or option in Excel to prevent this from happening?

    Thank you,
    Ben



  2. #2
    Dave O
    Guest

    Re: Data in narrow columns truncated when saving as DBF

    Just a guess here: when I create a table in Access I can specify field
    width for my entries. Is it possible the field width in your DBF file
    is set to some default value that is comparitively low?

    I just tested this by saving some Excel text as a DBF (DBase IV
    format). The only database program I have on this computer is Access,
    so I opened the DBF file using Access and found the file width to be 9
    characters- but I couldn't alter the field width because Access had
    attached the data rather than import it. Do you have software that can
    alter the field width?


  3. #3
    Ben Amada
    Guest

    Re: Data in narrow columns truncated when saving as DBF

    Dave O wrote:

    > Just a guess here: when I create a table in Access I can specify field
    > width for my entries. Is it possible the field width in your DBF file
    > is set to some default value that is comparitively low?
    >
    > I just tested this by saving some Excel text as a DBF (DBase IV
    > format). The only database program I have on this computer is Access,
    > so I opened the DBF file using Access and found the file width to be 9
    > characters- but I couldn't alter the field width because Access had
    > attached the data rather than import it. Do you have software that can
    > alter the field width?


    Hello Dave,

    Thanks for testing that out. I do have Access although I generally don't
    use it.

    I was able to create a new database in Access, import the Excel file into
    Access and then Export the data from Access to a DBF file. Also, since I
    imported the data (rather than "attach" it), Access allowed me to alter the
    field lengths although it wasn't necessary since when I import the data,
    Access must automatically detect the longest field of data and set the field
    length to that value.

    In short, your idea of using Access got me on the right track!

    Thanks again,
    Ben



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1