We help IT Professionals succeed at work.

Excel Add-in Development

Hello,

I have written an application as an Excel XLSM file.   I would now like to package it for commercial sale.  My goal is to be transparent to the user, and the same time protect my intellectual property.  I know that I can compile it into an EXE, but my preference would be to call it from an Excel add-in.  

The user would select actions from the ribbon that would copy input from his worksheet into my system, and then call VBA subroutines which perform the underlying data manipulations and then display results sheets.  

Can an Excel XLSM be called from an add-in?  Can its content be secured?  If not, could an EXE be called by in add-in?  Or, is there a better way?  

Thanks,
Mike.  
Comment
Watch Question

Top Expert 2010
Commented:
mhale said:
>>Can an Excel XLSM be called from an add-in?  

Yes, but why would you do that?  Why not just put the required code in the add-in file?

>>Can its content be secured?  

No, not really, unless you are willing to buy Visual Studio, and compile the code as EXE/DLL.  Alternatively, you
could use a compiler program like this: http://www.calc4web.com/index.html

>>If not, could an EXE be called by in add-in?  

Yes.  Any macro-enabled Excel file can call an EXE, or leverage code from a DLL.

>>Or, is there a better way?  

The only real way to protect your code would be to compile to EXE/DLL.  Within Excel itself, there is no way to
truly secure your code.

Patrick
If you view the VBA - PROJECT EXPLORER and right-click the application - properties - and set PROTECTION - LOCK PROJECT and give it a password.  This will prevent any one from accessing your code.
Also, as part of your password, one character could be something other than the normal character set.  For instance, if you open NOTEPAD and while holding down the ALT key - type the number 187 (for instance) and release the ALT key.  You will see a smiley face, or some other graphic character.  These can be used as part of your password (would probably even stump the commercial password breakers).
Scott C

Author

Commented:
Patrick,

If I may follow up on one of your suggestions.  I know that any Excel file cannot be secured sufficiently for commercial distribution.  To that end, i have compiled it into an EXE.  It seems solid enough.  However, I would rather not trouble the user to launch an executable, when it receives data from Excel anyway.  

Could you give me a nudge in the direction of developing an Excel add-in to: launch an executable, and then fire various macros from the ribbon bar?  

Thanks,
Mike.  
Most Valuable Expert 2012
Top Expert 2014

Commented:
Did you not develop your addin using VS? Is it not a DLL? By the way, .NET DLLs/EXEs can be decompiled!

Author

Commented:
CodeCruiser,

The application is a large XLSM file, that performs calculations and produces output, from data that is copied in from the user's Excel file.  I run it with LockXLS, a program that folds the XLSM file into an executable.  The executable launches Excel, if necessary, and then opens the embedded XLSM file.  

Mike.  

Author

Commented:
Thanks for trying.  I will continue my research.  

Commented:
Mike,

I'm barking up the same tree as you (although the file I'm trying to protect is an XLAM). Perhaps some of the following may be helpful to you or we can otherwise collaborate in finding a solution. I had the following preliminary issues with LockXLS and sent them an email.  Their response follows.

1.      I have multiple versions of Excel installed (Excel 2003, 2007 and 2010).  Whenever Excel is closed, any other Excel files I open by double-clicking on same will open up the most recent version of Excel that I have used (this is the default behavior from what I have been able to find in searching the Internet).  However, when Excel 2010 was the last version of Excel that I used, double-clicking LockXLS's “Sample_Locked.exe” file opened in Excel 2007.  Is LockXLS aware of and compatible with Excel 2010?  If so, how do I get this “Sample_Locked.exe” file (or my "locked" Add-in) to open in that version?
2.      When the “Sample_Locked.exe” file opened in Excel 2007 (as evidenced by the =TestAddin() function working, although I could find no other trace of it in either Excel Options or the Visual Basic Editor), none of the other Add-ins that I have installed in Excel opened or at least were visible in the Excel Ribbon, despite that they DO show as “Active Application Add-ins” in the Excel Options | Add-ins dialog (an example here is the popular “ASAP Utilities” Add-in). Why does the “Sample_Locked.exe” file disregard or defeat these other Add-ins from being deployed on the Ribbon and is there a way for them to be automatically deployed as in a normal Excel session?
3.      Similarly, I also have a hidden “Personal.xls” file (containing frequently used macros) that normally is automatically deployed from its C:\Users\Jeffrey\AppData\Roaming\Microsoft\Excel\XLSTART folder location but this file does not open in the session initiated by the “Sample_Locked.exe” instance of Excel 2007. How do I make this happen?

Their response (this morning):

"#1. LockXLS is compatible with Excel 2010. We've changed LockXLS behaviour recently. Now locked application tries to open the most recent version of Excel. If Excel 2010 is installed, this will be Excel 2010. I think, new version of LockXLS which will be published soon will solve this issue.

#2. #3. I've asked our developers to fix this issue. Looks like when Excel is launched using OLE Automation it ignores startup items.

I will inform you when new setup will be published on our website. We plan to publish it within next 2-3 days."

So, I'm not sure if my questions 2 & 3 will be addressed in this imminent release or not but really they would need to be for me to be able to use same (for my application, it's unacceptable to remove other Excel functionality ...).

Hopefully, they'll be good news coming from LockXLS soon but in the meantime, I'm on to check out the "CONVERTER FROM XL TO EXE" at this page:

 http://cpap.com.br/orlando/XLtoExeMore.asp?IdC=OrlMoreWin

... and failing that, I'll have a look at the link Patrick mentioned above (http://www.calc4web.com/index.html) although at first blush, it looked like it might be over my head ...

Let me know if you want to hear further and obviously, I'd like to hear how you fare as well.

Jeff

Author

Commented:
Jeff,

Thank you for sharing your experiences and thoughts. I am heartened to hear that LockXLS is working with you and responding to these legiimate concerns. We certainly do have many concerns in common, however in a manner of speaking we are attempting to do opposite things. Tell me if I have this this right;



Author

Commented:
Jeff,
Sorry, I didn't mean to submit that yet.  Continuing; my proprietary content is in an XLSM file and I am considering a simple XLAM file to call the converted EXE.  Your intellectual property is in the XLAM file itself.  
Do I have that right?  
Mike.  

Commented:

Hi Mike:

>  Continuing; my proprietary content is in an XLSM file and I am considering a simple XLAM file to call the converted EXE.  Your intellectual property is in the XLAM file itself.  

Yes, my IP is in the XLAM proper.  But considering Patrick's answer to your question above:

>>>Can an Excel XLSM be called from an add-in?  

>>>Yes, but why would you do that?  Why not just put the required code in the add-in file?

I'm not sure of all the issues you are wrestling with, but it seems to me that Patrick's comment is on target here ... That is, assuming that LockXLS can provide the 'corrections' I mentioned previously, would you not be able to have your IP reside in an intact, 'locked' XLAM file (technically, I guess we're talking about an XLAM contained within an EXE file), without having to call either an XLSM or external EXE file? Or, failing that, are you suggesting that an XLAM file can somehow call a locked "EXE" file that would avoid the 3 issues I identified in my initial post?

BTW, I am also taking a look at this site:

http://www.exceltranslator.com/ETHome.htm

Some of their claims:

"URS Translator™ for Excel is a revolutionary new technology that translates Excel spreadsheets into executable machine code at a click of a button. It converts Excel models into C++ programs, compiles and links workbooks with any associated VBA and program modules, and produces fast executable machine code.

There's no coding. No debugging. No tedium of programming and reprogramming. You just focus on creating your Excel model. With one click, URS Translator™ for Excel converts Excel models into executable machine code, with robotic precision and efficiency, fast and error-free. Instantly go from prototype model to production version."

... which sounds promising ... but I have my doubts about it fitting for my uses so far. There's a pretty extensive FAQ that suggests it may be more up your tree (my app is more along the lines of a UI/Ribbon replacement and I'm not sure what this product would do for me yet).  I also haven't found a price (if any) yet ...

Jeff

Author

Commented:
Jeff,

Does something strike you as odd, about the URS website?

Mike.  

Author

Commented:
Jeff,
In response to your question; "are you suggesting that an XLAM file can somehow call a locked "EXE" file that would avoid the 3 issues I identified in my initial post?".  Actually, that's exactly what I envision.  
My XLSM file is exactly as I want it, but I have been thinking that the most seamless for the users would be to develop a simple XLAM with a few ribbon bar functions, which would then launch my EXE.  
By the way, I can't image EE would object to our taking this phase offline.  If you would like to exchange contact information, I'm at Register@HaleConsulting.com
Mike.  
 

Commented:
Ok, Mike - I'll send you an email.

Jeff