If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel 2007 Add-in to save DBF

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-09, 14:13
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Excel 2007 Add-in to save DBF

I have been "upgraded" to Excel 2007 which I discovered does not save to DBF format

So I put together the attached Excel 2007 add-in to add this functionality back in. Once activated, it will add a "dBASE IV DBF" menu item in the Office menu Save As list. It works mostly like the Excel 2003 save as DBF.

To install, unzip the attachment to your "Documents and Settings\UserName\Application Data\Microsoft\AddIns\" folder and activate it in Excel.

One issue is that the Jet driver ignores the data types and uses what it thinks is best instead. A work-around would be to reopen the table with the VFPOLEDB driver and alter table the columns to what you want.

Hopefully people will find this more useful than copying the data to Access and exporting from there.

Attached Files
File Type: zip SaveDBFIV.zip (22.3 KB, 3925 views)
Reply With Quote
  #2 (permalink)  
Old 06-23-09, 03:57
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
I have an error trying to save as dbfIV - see attached screenshot.
Thanks for any hint about whats wrong here.
Attached Thumbnails
Excel 2007 Add-in to save DBF-savedbf.jpg  
Reply With Quote
  #3 (permalink)  
Old 06-23-09, 12:08
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Was there an error message that came up when that happened?
Reply With Quote
  #4 (permalink)  
Old 06-23-09, 12:53
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Yes, a dialog box saying (in French)

Compilation error
Project or library not found

Bonne soirée :-)
Reply With Quote
  #5 (permalink)  
Old 06-24-09, 03:40
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Usually this error is caused by a missing library reference.

Here are suggested steps to solve this problem. They might not be exact as I don't have Excel 2007 where I am right now.

1. Open the Visual Basic editor (Alt + F11 ???)
2. Open Module1 in SaveDBFIV
3. In the Tools menu choose References.
4. If there are any items in the list that are marked as MISSING, deselect them. (Write them down for future use)
5. Save and try again
6. If that does not fix the problem, you might need to try and find a similar library to the missing one in the list and select it.

I'm not sure how Excel labels things in French, but hopefully it is similar.

If this doesn't work, please post which references were labeled MISSING. If there were no missing references, please post all of the references that are selected.

Bonne chance
Reply With Quote
  #6 (permalink)  
Old 06-24-09, 03:56
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Only 4 are ticked, none are marked as missing.

Perhaps I need to tick some more (=install?).

I attach a screenshot.
Attached Thumbnails
Excel 2007 Add-in to save DBF-vb.jpg  
Reply With Quote
  #7 (permalink)  
Old 06-24-09, 12:11
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
It is strange that only 4 were selected. Try to select the following also:

Microsoft ActiveX Data Objects 2.8 Library
Microsoft ActiveX Data Objects Recordset 2.8 Library
Microsoft ADO Ext. 2.8 for DDL and Security
Microsoft Scripting Runtime


If that still doesn't work and the error message changes or the highlighted line of code changes, please post the update.
Reply With Quote
  #8 (permalink)  
Old 06-25-09, 02:57
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Now I have
Missing: Visual Foxpro 9 Type Library
Reply With Quote
  #9 (permalink)  
Old 06-25-09, 03:30
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
I think it should work without the Visual FoxPro 9 Type Library. That was something I was experimenting with during development.

If you deselect that one does it still give you the same error?
Reply With Quote
  #10 (permalink)  
Old 06-25-09, 11:21
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
The selection comes back on itself ?
Reply With Quote
  #11 (permalink)  
Old 06-25-09, 22:33
majorde majorde is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
That is very strange. I'm attaching an updated version that doesn't have that Visual FoxPro reference activated. Please try this one and let me know if it works.
Attached Files
File Type: zip SaveDBFIV.zip (23.5 KB, 1758 views)
Reply With Quote
  #12 (permalink)  
Old 06-26-09, 03:24
Guppy7 Guppy7 is offline
Registered User
 
Join Date: Jun 2009
Posts: 6
Thanks it works now, with some constraints:
If I edit and existing dbf I need to give a new name - it couldn't replace the existing one. Also, necessary to go through the "Save as..." menu to save change.
Reply With Quote
  #13 (permalink)  
Old 07-01-09, 15:16
gygulyas gygulyas is offline
Registered User
 
Join Date: Jul 2009
Posts: 6
Add-in to Save dbf in Excel 2007

You could also try:

XLSX2DBF is an Excel 2007 add-in that helps convert and/or save a native DBF file that was edited with Excel 2007.

Two common scenarios are supported:

A) Open a native DBF file in Excel 2007 – Make changes – Save as a native DBF file with the changes.

B) Open/create an Excel file that looks like a database (headers/columns/rows) – Save as a native DBF file.

http://thexlwiz.blogspot.com

Gyula
Reply With Quote
  #14 (permalink)  
Old 07-03-09, 01:11
j_j_b j_j_b is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
I'm having problems getting either of the versions you've posted to work. I have all the references you listed as required selected but it fails on the line cat.Tables.Append tbl

I get the following error message:
Run-time error ‘-2147467259 (80004005)’:
Unexpected error from external database driver (15877).
Reply With Quote
  #15 (permalink)  
Old 07-07-09, 03:14
subbudu subbudu is offline
Registered User
 
Join Date: Jul 2009
Posts: 1
Hello,
I downloaded upgraded "SaveDBFIV.zip", extracted under proper addin folder and activated under excel2007. It is seen under active application add-ins under excel options. No missing entries found under visual basic references. But still it is not working. There is no "dBASE IV DBF" menu item in the Office menu Save As list. Please HELP.

Subbudu
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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