Sunday, August 2, 2009

I need to copy a foxpro 6 dbf file in excel 2003.?

I typed "copy f:\filename.dbf to c:\filename.xls at the command prompt but the file does not copy. What is the correct syntax for this function?

I need to copy a foxpro 6 dbf file in excel 2003.?
Open Excel, then choose to open a file. Change "Files of Type" to "All Files". Then browse for your DBF file and Excel will do its best to open it.





You can't just change the extension of a file and have it convert formats automatically.
Reply:U load visual foxpro 6.0 and give the following commands





use customer %26amp;%26amp;customer is the dbf name and u are opening it.


copy to customer.xls type xls %26amp;%26amp;this command will copy customer.dbf as customer.xls and go to excel and open this file.





alternately u can load excel and click on file and open. and select dbf in the files of type


then select customer.dbf and do what ever formatting u want and then save as customer.xls.





any clarrification contact me at lakshmiteja@rediffmail.com





regards





(lakshminarayana r)
Reply:hi...


Solution 1. The syntax of copy command in command prompt is


Copy f:\filename.dbf c:\filename.dbf. so, just ignore the "to" in your syntax. Then this command won't give u the solution. 'ecause if u want to copy the foxPRO 6 file into Excel file u just do the following.


1. Open the Excel application.


2. Select the file menu -%26gt; then Open -%26gt;in the filename area type your database file path and file name. fox eg. F:\filename.dbf then click open.


3. Now u have opened the file. If u want to save the file in Exel format, select the file menu -%26gt; select save -%26gt; it will ask the filename and file type, select Microsoft Excel workbook or work sheet.


4. i hope this is the right way to copy the .dbf file into .xls file.





reply me.
Reply:you'd have better luck opening it in access.





Access is a database like foxpro and Excel is a spreadsheet or go into Excel and choose open file and choose file type for dbf.


No comments:

Post a Comment