Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default how to read dbf file using macro?

Hi,
i want to read each row of specific column of musa.dbf using macro
(VBA) in excel.
my main gole is to copy the data of dbf file to excel file.
I am new but want to do something..i tried and tried...and finally i am
here....
help me.

musa.biralo

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to read dbf file using macro?

if it is dbf 3 of 4 format

Dim sPath as String
sPath = "C:\MyDBFFiles\"
workbooks.Open sPath & musa.dbf
Activeworkbook.SaveAs sPath & "musa.xls", xlWorkbookNormal



--
Regards,
Tom Ogilvy



"musa.biralo" wrote in message
ups.com...
Hi,
i want to read each row of specific column of musa.dbf using macro
(VBA) in excel.
my main gole is to copy the data of dbf file to excel file.
I am new but want to do something..i tried and tried...and finally i am
here....
help me.

musa.biralo



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default how to read dbf file using macro?

Thank you Tom

This code simply saved the musa.dbf as musa.xls.

My main target is to get the DATA from a simple dbf file and populate
it in excel. what my real need is to open the dbf file and get the
value from there then populate the value in excel.

Can you direct me to the place where i can get such information. if you
have such code that will be the best....

Once again, thank you for the help.

Tom Ogilvy wrote:
if it is dbf 3 of 4 format

Dim sPath as String
sPath = "C:\MyDBFFiles\"
workbooks.Open sPath & musa.dbf
Activeworkbook.SaveAs sPath & "musa.xls", xlWorkbookNormal



--
Regards,
Tom Ogilvy



"musa.biralo" wrote in message
ups.com...
Hi,
i want to read each row of specific column of musa.dbf using macro
(VBA) in excel.
my main gole is to copy the data of dbf file to excel file.
I am new but want to do something..i tried and tried...and finally i am
here....
help me.

musa.biralo


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default how to read dbf file using macro?

Can you Query the database/file /
Check out DataNew Database query and follow the Wizard.
Make sure you understand about DSNs and/or connection string.

NickHK

"musa.biralo"
roups.com...
Thank you Tom

This code simply saved the musa.dbf as musa.xls.

My main target is to get the DATA from a simple dbf file and populate
it in excel. what my real need is to open the dbf file and get the
value from there then populate the value in excel.

Can you direct me to the place where i can get such information. if you
have such code that will be the best....

Once again, thank you for the help.

Tom Ogilvy wrote:
if it is dbf 3 of 4 format

Dim sPath as String
sPath = "C:\MyDBFFiles\"
workbooks.Open sPath & musa.dbf
Activeworkbook.SaveAs sPath & "musa.xls", xlWorkbookNormal



--
Regards,
Tom Ogilvy



"musa.biralo" wrote in message
ups.com...
Hi,
i want to read each row of specific column of musa.dbf using macro
(VBA) in excel.
my main gole is to copy the data of dbf file to excel file.
I am new but want to do something..i tried and tried...and finally i am
here....
help me.

musa.biralo




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how to read dbf file using macro?

my main gole is to copy the data of dbf file to excel file.

so when it is saves as an excel file, the data from the dbf file isn't in an
excel file?

I believe it is. If you want to populate an existing file, then open it in
excel as I have shown you, then access the cells you want and place the
values in the location you want of the existing file. then close the open
dbf file without saving.

You can also approach it as Nick has suggested - it is pretty much the same.

--
Regards,
Tom Ogilvy

"musa.biralo" wrote:

Thank you Tom

This code simply saved the musa.dbf as musa.xls.

My main target is to get the DATA from a simple dbf file and populate
it in excel. what my real need is to open the dbf file and get the
value from there then populate the value in excel.

Can you direct me to the place where i can get such information. if you
have such code that will be the best....

Once again, thank you for the help.

Tom Ogilvy wrote:
if it is dbf 3 of 4 format

Dim sPath as String
sPath = "C:\MyDBFFiles\"
workbooks.Open sPath & musa.dbf
Activeworkbook.SaveAs sPath & "musa.xls", xlWorkbookNormal



--
Regards,
Tom Ogilvy



"musa.biralo" wrote in message
ups.com...
Hi,
i want to read each row of specific column of musa.dbf using macro
(VBA) in excel.
my main gole is to copy the data of dbf file to excel file.
I am new but want to do something..i tried and tried...and finally i am
here....
help me.

musa.biralo



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
Network Macro Crashes (cannot Save 'read-only' File) Chuckles123[_120_] Excel Programming 0 May 12th 06 04:52 AM
macro read xml file raisin Excel Programming 1 November 28th 05 03:09 PM
Macro to read filename in cell and open new file April Excel Programming 2 July 27th 05 02:49 PM
How to write a macro to open a file read-only? Mark Seger Excel Programming 20 June 5th 05 05:31 PM
Saving a file within a macro but only when it does not have a read only attribute Alex Excel Programming 2 September 16th 03 04:19 PM


All times are GMT +1. The time now is 03:56 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"