Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - how to use an VBA (visual Basic) .xla addin in NeoOffice?
how to use an VBA (visual Basic) .xla addin in NeoOffice?
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
mac_er
Blue Pill


Joined: Feb 13, 2009
Posts: 3

PostPosted: Fri Feb 13, 2009 1:40 pm    Post subject: how to use an VBA (visual Basic) .xla addin in NeoOffice?

A Yahoo forum covers the freeware SMF (Stock Market Function) add-in that allows Excel to download stock market and public company financial information from sites such as yahoo finance and MSN. (http://finance.groups.yahoo.com/group/smf_addin)

The add-in is a .xla spreadsheet using the VB6 implementation of visual basic. Excel 2004 uses th VB5 version, and thus Excel 2004 for Mac will not work with it.

How can I load the .xla add-in? The extension manager will not accept .xla. Can I somehow convert the .xla into something that will run in NeoOffice? If not, will version 3.0 allow it.

Attached is the zip attachment, if anyone is interested
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Feb 13, 2009 2:51 pm    Post subject: Re: how to use an VBA (visual Basic) .xla addin in NeoOffice

mac_er wrote:
The add-in is a .xla spreadsheet using the VB6 implementation of visual basic. Excel 2004 uses th VB5 version, and thus Excel 2004 for Mac will not work with it.


The only application that I know of that support .xla files is Microsoft Excel. The Tools :: Extension Manager menu in NeoOffice can only load OpenOffice.org extensions.

In general, neither NeoOffice nor its underlying OpenOffice.org code can load Microsoft Office extensions as such extensions absolutely need Microsoft Office to run.

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Feb 13, 2009 4:45 pm    Post subject:

I have no idea how this thing is supposed to work, but I noticed that if I

1) rename the file to .xls, and
2) Allow NeoOffice to load macros from untrusted sources after prompting (set Macro security in the Security section of NeoOffice preferences to "Medium"), then

I see macros listed in the file.

Is the .xla file supposed to be like a macro library, and you call various macros in your own spreadsheets? If so (and if the VBA macros work properly in Neo), you might be able to use them.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
mac_er
Blue Pill


Joined: Feb 13, 2009
Posts: 3

PostPosted: Fri Feb 13, 2009 7:54 pm    Post subject: how to use an VBA (visual Basic) .xla addin in NeoOffice?

Smokey, the file works as a function library, allowing custom functions to work as though they were part of Excel. The marcos are called by the new functions, and return financial data such as the 3rd quarter revenue for a specific public company.

For example, the function in a cell such as

=RCHGetElementNumber(AAPL,5286)

would return the most recent fiscal year revenue for Apple.

When I have tried it in NeoOffice, it returns #NAME instead of the revenue figure, suggesting that something is not working...

Is there any way to convert the .xla file contents into an extension that NeoOffice can run, since the as you noted, the formulas are all there in the spreadsheet?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Feb 13, 2009 8:11 pm    Post subject:

mac_er wrote:
For example, the function in a cell such as

=RCHGetElementNumber(AAPL,5286)

would return the most recent fiscal year revenue for Apple.

When I have tried it in NeoOffice, it returns #NAME instead of the revenue figure, suggesting that something is not working...


You cannot define a custom spreadsheet function in either NeoOffice nor OpenOffice.org. This is why the Excel extension will only work with Excel and the authors of the extension designed it specifically for Excel.

mac_er wrote:
Is there any way to convert the .xla file contents into an extension that NeoOffice can run, since the as you noted, the formulas are all there in the spreadsheet?


Sorry to give you the bad news but the answer is no. While NeoOffice has limited, experimental support for simple Excel VBA macros, the VBA macros in your .xla require many Excel-specific VBA macros that NeoOffice's limited VBA support can execute. In other words, if you figure out how to get the VBA macros to execute (which is no small task per my previous comment), execution of the VBA macros will fail due to syntax errors when NeoOffice runs into any one of the many unsupported VBA commands.

In other words, if you really need to use your Excel extension, you really only have one option: purchase a copy of copy of Microsoft Office 2004 (note that Microsoft Office 2008 does not support VBA macros at all)

Patrick
Back to top
mac_er
Blue Pill


Joined: Feb 13, 2009
Posts: 3

PostPosted: Sat Feb 14, 2009 6:56 am    Post subject: how to use an VBA (visual Basic) .xla addin in NeoOffice?

Many thanks for your help and your clear comments, even if I would have preferred a different answer.
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Sat Feb 14, 2009 2:58 pm    Post subject:

pluby wrote:
In other words, if you really need to use your Excel extension, you really only have one option: purchase a copy of copy of Microsoft Office 2004 (note that Microsoft Office 2008 does not support VBA macros at all)

Patrick


According to the original post, even Excel 2004 won't handle this extension…
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat Feb 14, 2009 6:14 pm    Post subject:

Samwise,

Samwise wrote:
According to the original post, even Excel 2004 won't handle this extension…


Good catch. I did not try loading the .xla file in Excel 2004, I only looked at the VBA code and saw that there were lots of VBA keyboards that have been found to not be supported by the Novell VBA parser that NeoOffice uses.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.