Sir,
I am using Excel 2003 and Visual FoxPro 6.0.
In an excel file there are a few fields from Column A to Column E... Those fields are RECNO, NAME, DOJ, EMP_CD,CREDIT ...
There are also a few records within that ... What I would like to do export the total excel sheet to a .dbf file. But the Fields should specifed length in excel in such a way that when the data export shall be made from excel to .dbf file, it will copy all the records within the excel sheet within that range. Is there any macro to solve the said problem ...
I made an attempt to export the datas from excel sheet to .dbf file from the file menu through SAVE AS option. In this way data are exported to .dbf file if it choosen on database format. But database shall be created only if it is normally an excel file(There is no border outline, header footer name specified and other excel formatting as used ). Evenif it was creted the length I have to specified thereafter by using the database file. Very clumsy procedure .. I would rather required a macro that would copy the records with specified field name by removing all excel based formatting.
The field length may be :-
RECNO NUM(3)
NAME CHAR(30)
DOJ DATE(8)
EMP_CD NUM(6)
CREDIT NUM(10)
Export to Database File
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Export to Database File
I don't understand your question, If you save an Excel sheet as a .dbf file, only the values will be exported, not formatting such as borders, or headers and footers, because a database table doesn't have those.
Best wishes,
Hans
Hans
-
- StarLounger
- Posts: 77
- Joined: 15 Jan 2011, 02:32
Re: Export to Database File
Sir,
Actually I failed to create .dbf files in excel save as mode having formatting. Secondly, the .dbf files that are being created are to modified the structure later. Is it possible that a macro could created the field type & length specified database ...
Regards
Jigyansha
Actually I failed to create .dbf files in excel save as mode having formatting. Secondly, the .dbf files that are being created are to modified the structure later. Is it possible that a macro could created the field type & length specified database ...
Regards
Jigyansha
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Export to Database File
I'm afraid I can't help you with this. I'm using Excel 2007, and Microsoft has removed all support for importing/exporting .dbf files from this version.
Perhaps you can use Foxpro Export : DBF Converter & DBF Viewer or Excel FoxPro Import, Export & Convert Software but neither is free.
Perhaps you can use Foxpro Export : DBF Converter & DBF Viewer or Excel FoxPro Import, Export & Convert Software but neither is free.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 482
- Joined: 24 Jan 2010, 15:02
- Location: Colorado, USA
Re: Export to Database File
Have you considered saving the Excel worksheet as a delimited text file (comma or tab delimited), and then importing it into Fox Pro. I am not a Fox Pro user, but nearly all database products can import a text file. Using that approach you may also be able to design and save an empty table and then simply import the text file directly into the table.JIGYANSHA1985 wrote:Actually I failed to create .dbf files in excel save as mode having formatting. Secondly, the .dbf files that are being created are to modified the structure later. Is it possible that a macro could created the field type & length specified database ...
Wendell
You can't see the view if you don't climb the mountain!
You can't see the view if you don't climb the mountain!