Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ben Amada
 
Posts: n/a
Default 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   Report Post  
Dave O
 
Posts: n/a
Default

Just a guess he 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   Report Post  
Ben Amada
 
Posts: n/a
Default

Dave O wrote:

Just a guess he 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing data validation scenarios SJC Excel Worksheet Functions 14 July 24th 05 12:43 AM
Convert data from rows to columns boksic Excel Discussion (Misc queries) 4 July 4th 05 11:40 AM
Text to Columns / Importing Data John Thomson Excel Discussion (Misc queries) 0 May 4th 05 08:21 PM
analysing data from alternate columns using the countif function Juniper Excel Discussion (Misc queries) 3 April 28th 05 04:12 PM
Macro to Synchronize data frm svrl workbooks & columns to 1 workbo jbsand1001 Excel Discussion (Misc queries) 1 April 28th 05 10:42 AM


All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"