daneb
May 24th, 2001, 09:19 PM
Hi.
We have an app in development that converts an Access table into a .DBF file. We have already done the conversion using VB code. However, the converted file doesn't follow the required number of characters of some fields, especially numeric fields. Numeric fields are altered, usually, the number of characters are increased. This may be attributed to the fact that many of Access' data types are not supported in dBase DBF format. Because of this, the .DBF file may become useless since the intended structure was not met.
So what we have in mind as a resort is to use Excel as our interface in converting the Access table in dBase format. How can we do the following steps automatically using VB code:
1) Start up Excel.
2) Open a particular Access table.
3) Set the width of each field. (This is necessary to match the required number of characters for each field.)
4) Save the opened table in dBase format. (This will save only the range of cells populated by data from the table, instead of the entire worksheet.)
Excel may be made invisible during the entire process so that the user will not have any ideas of what's going on in the background. Are all these possible? Thanks for the info in advance!
We have an app in development that converts an Access table into a .DBF file. We have already done the conversion using VB code. However, the converted file doesn't follow the required number of characters of some fields, especially numeric fields. Numeric fields are altered, usually, the number of characters are increased. This may be attributed to the fact that many of Access' data types are not supported in dBase DBF format. Because of this, the .DBF file may become useless since the intended structure was not met.
So what we have in mind as a resort is to use Excel as our interface in converting the Access table in dBase format. How can we do the following steps automatically using VB code:
1) Start up Excel.
2) Open a particular Access table.
3) Set the width of each field. (This is necessary to match the required number of characters for each field.)
4) Save the opened table in dBase format. (This will save only the range of cells populated by data from the table, instead of the entire worksheet.)
Excel may be made invisible during the entire process so that the user will not have any ideas of what's going on in the background. Are all these possible? Thanks for the info in advance!