Creating an .exe file from an excel spreadsheet - excel

Can a standalone .exe be created from an excel file which has a few forms and macros?

Standalone as in "the user doesn't have to have Excel installed"? No. It's still an Excel file; it needs Excel to be available to run it.
You may be able to get away with the Excel viewer though. Worth a try, if you're worried about licensing costs. It won't let you edit data though, which may well include forms... you'd have to try it to be sure.

Maybe an Excel viewer would be an option? I'm not sure how much support there would be for macros, etc.

SpreadsheetGear for .NET includes a Windows Forms control into which you can load an Excel workbook. The Excel workbook becomes part of the Windows Forms application (it is embedded in the .exe).
The bad news is that SpreadsheetGear will not execute your macros so you will have to rewrite them to the SpreadsheetGear API. The good news is that the SpreadsheetGear API is very similar to the Excel API.
Disclaimer: I own SpreadsheetGear LLC

Related

Call Office 365 new-style add-in from VBA

I'm maintaining a legacy Excel workbook that has a significant amount done in VBA. For threading's sake, I need to move some of that work out of VBA. I have prototyped a DLL written in C#, but deployment (with registration) is more difficult.
Can you interact with the new HTML5 style add-ins using VBA? So, in this case, writing a function in Javascript, and then calling it with specific parameters from the existing VBA macro. If so, how?
Unfortunately this is not a scenarios supported by Microsoft nowadays.

Distributing an Excel add-in (.xlam) whose code cannot be viewed by the user

I am fairly experienced with Excel and VBA and I know how to create add-ins. However, I haven't found a satisfactory solution for protecting my VBA code once it is in an add-in. How can I make this code inaccessible to the user?
You can protect your VBA code against viewing, however it is relatively easy to crack.
You can easily Google out how to protect a VBA module.
Alternatively, you can create an Add in using Visual Studio. Yet again, .Net code can be decompiled in seconds. Thus, you would need to use a code obfuscator.

how many ways to do programming in Excel . except for VBA

I want to manipulate data in excel with some complex functions.
It seems that I have to use VBA.
However I don't want to learn it.
Is there any other way to do programming in the excel? Some language like C#?
I don't want to create a independent C# application using some interface provided by Excel. Only program in excel, like VBA, but a different language.
I don't want to create a independent C# application using some interface provided by Excel. Only program in excel, like VBA, but a different language.
You cannot unfortunately. To program in Excel from within Excel you will have to learn VBA.
To program for Excel, be it VBA, VSTO(C#, VB.Net) you need to understand the Excel Object Model (EOM) without which you cannot do programming for Excel.
You don't need to learn VBA per se if you want to develop Office solutions from C# but as you become familiar with the EOM, you will notice that you automatically develop an understanding for VBA.
EDIT
Excel Object Model from Excel's perspective
Excel Object Model Overview from VS's perspective
You can develop Excel "Add-Ins" in C# using VSTO - Visual Studio Tools for Office (MSDN link).
This is not truly "inside Excel," but once installed your add-in can run without having to start up any external application.
Excel has a VBA editor built in to use VBA only.
If you want to use another language it would need to be external.
While you could make a C# add in, this is not in the built in editor as you described.
To the best of my knowledge, you simply cannot do this right now. In Office 15 it looks as though you'll be able to use JS:
http://www.zdnet.com/blog/microsoft/microsoft-to-focus-on-html5-and-javascript-for-office-15-extensions/10266

Excel .net component?

I need an excel component for developing which replace for M$ Excel COM component, because i don't want my client install their excel component on the machine any more, but make sure that it support copy, paste and delete cell direct on the document (grid in asp.net).
(open source, free or commercial)
Thanks in advance!
I would 100% recommend SpreadsheetGear. We replaced all of our Excel COM components with their tool about a year ago, and we haven't looked back. It's got near-Excel API compatibility as well. In half our projects, it was as easy as changing the references.

Dealing with excel files what can be used besides VBA?

I have been working on an excel file which will combine each of the excel files
sent by the users. So I will have a user entry row per file.
I started by using VBA. I thought that it would be the best, natural choice, though
I did not know how to use it previously. At the moment I have come across problems that I have no idea how to solve in VBA - I want to open each of the excel files that contains a user form seamlessly even if it contains VBA code, but what happens is that each opening user gets a dialog that requires them to accept or reject VBA.
I really like to learn new things but it is starting to annoy me. I do hope there some other solution to do that, but not in VBA. Is it possible to do that in some other language, and fire it from VBA?
I would love to have all bounded in that master excel file, or at most just to provide some library. The excel version is 2003.
how are you opening the file? Workbooks.Open will open an excel file which has vba without asking the user to accept or reject code.
Perhaps its an issue with the security settings you have. You can check these out from the menu - Tools, Macro and then security
your question is not well defined.
if you need to manipulate Excel files without opening Excel program, you can use other programming languages. Either interface with the COM / ActiveX objects that excel provides to the operating system, or use independent libraries (e.g. for PHP, Java, Python and more).
Another solution (to whatever problem you may have) is to use OpenOffice for working with excel files. It has its own macro language, as well as built-in bridges and interfaces to java & python.

Resources