I'm looking for an explanation as to what I can and can't do as well as advantages and disadvantages to using Visual Studio for coding instead of the built in text editor in Excel.
From my perspective
Use VBA editor (VBE) if you
develop ad-hoc apps for yourself, friends
are the only one who works on a project
mainly works with the Office object model - no communicating with System, Web, database etc.
don't use source control (Note: Rubberduck is here to help if you do so)
don't include too many dlls from the Reference form
don't want to learn new platform (.NET)
Note, I did all the above and I could live with just VBA for long time without too many problems and in a few ways VBA is much better than VSTO e.g. in debugging (here I mean, you can change almost everything when you are debugging VBA and you'll be still able to continue, there is no way to do the same in VSTO)
Use VSTO if you
want to better support for System, Web, XML, database tasks. NET is
much more better especially if we're talking about web or database
stuff
want to have better support (sometime out of box) for version control
(GIT, SVN, TFS, Perforce)
don't won't to have problems with dependencies (this could be
actually painful as well)
want to use new VSTO objects like NamedRange incl. events
want to learn new platform
I remember myself a few years ago when I thought VSTO brigs something new to Office object model, and it doesn't if you don't count the VSTO objects. So if you're heavily working with just Excel object model (manipulating with ranges, sheets, workbooks, calculating) you can still live with VBA only.
I also remember that with VSTO you can't easily create UDF (custom function)
Also seems like that MS is not going to invest too much effort to add/update/improve VSTO, they rather focus on Office API
VSTO blog - comments
Thanks for your question Ben, we have already publically announced that we will not be turning off VSTO or VBA in the next version of Office. All of our new investments are in Apps for Office and Apps for SharePoint and making the Office 365 APIs more robust. We will not be making any future investments in VSTO or VBA
It might look like I'm against VSTO but I'm not, I've been using it for more than 4 years daily and returning back to VBA just for quick testing or quick projects.
Hope this helps
From developing language, Excel Editor is VBA, and VS is C#/VB.NET. If you have a light function, you could use VBA directly, if you have a large requirement, .NET/VSTO would be suitable, it would be convenient to manage your code in VS, .NET.VSTO is managed code, it’s performance is better than VBA. With VSTO, you could custom Office UI. From distributing your project, you need to copy the office file with macro enabled. You could use ClickOnce or Windows installer to distribute .net/VSTO solution.
Related
guys!
we are developing a formula editor.
we want to insert our formula in Word (the formula image is normally displayed in Word) and edit again, just like xlsx files.
when double clicking, we want to launch our editor program to edit the formula and then replace it in Word.
we have already done that on Windows, but under the macOS, we are confused because we do not know how to implement them.
can you please tell me if that possible? is there a similar function implementation of office word under macos?
any advice or suggestion is welcome!
No, it is not possible because OLE is based on the COM technology which exists on Windows only.
As a possible solution you may consider creating an Office web add-in which can be installed on all platforms from web browsers to Mac OS. See Develop Office Add-ins for more information.
You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team go through the planning process.
I have an Office Word add-in that I wish to make it work with Office Word 2016 for Mac. I tried looking into official Microsoft documentation and could not find anything. I want to reuse as much code as possible while still having the extension to work with older versions of Word as well as Office Word 2016.
Is there any way to do this? Any help, even if it is something remotely related to this is appreciated.
TL;DR;
There is no way to do that.
Microsoft has bet on a new technology suite also called Office add-ins but web based. They are compatible with Mac. The old COM based approach (on which VSTO .NET add-in are built on) are legacy.
There is no way to reuse .NET code with this new technology, except of course to port business logic to the web server (which serves the web based add-in).
More reading on the comparison with the two add-ins generation: see this article I wrote
I second Benoit's answer. In addition, Not sure how complex is your add-in in terms of interactions with the document content, or if its a service that then inserts or imports data from a backend. Depending on that you will have more reusable code.
I would recommend you to do a full analysis on what APIs you need for your add-in to work properly. The new model offers big value with both supporting multiplatform and an easier deployment model. It also provides many rich APIs you can use, however the API depth its still not as rich as VSTO. Our goal is to get there.
I would be curious to understand if there are any gaps on you migration analysis.
thx!
We are creating an excel plugin but need some guidance as we're new to excel development (but not new to programming).
Here's what we want: Once the user installs the plugin, they will authenticate w/ our server to ensure they are a subscriber to our service (the plugin will save login info and password so they don't have to enter credentials everytime). From there, the user will be able to type in custom formulas (UDFs) in Excel and pull data from our mysql database.
Here's what we've tried:
We started w/ VisualStudio (C#) and got excel to output some mysql data when the spreadsheet starts up. Looking into it further, people have suggested to use ExcelDNA to create UDF's. So, we did some reading on ExcelDNA and have created a helloworld xll but haven't been able to find anything on how to authenticate the user. Should we be using ExcelDNA? VisualStudio? Something entirely different? thx!
Excel-DNA is exactly right library to use (I'm the developer, but still...).
You would probably use Visual Studio as your IDE to make the .NET assembly with functions and macros in. But your .NET .dll will be integrated into Excel using the Excel-DNA .xll instead of the Visual Studio Tools for Office (VSTO) libraries that ship with Visual Studio Professional.
Nothing in Excel-DNA (or any of the other add-in frameworks I know of) gives you a pre-built implementation of the authentication feature you ask for. But implementing it yourself should not be too hard - you'd do your check and possible username/password prompt in the AutoOpen handler of the add-in, and enable or disable the functionality based on the result from your web call. You should be a little bit careful if you are making a potentially slow web request during the add-in load...
You could also implement the log-in via ribbon interface, with an indicator of the current status and a button to log in. That way users would not be confused about why your add-in 'is not working' when the functions are disabled.
On the Excel-DNA CodePlex site http://exceldna.codeplex.com there are links to other projects based on Excel-DNA. The best place for support is the Google group at http://groups.google.com/group/exceldna. I also monitor the 'excel-dna' tag on StackOverflow, but often the group is nicer for ongoing back-and-forth discussions and explanations.
I am working on in installer project that needs to gather some info and act on it during the install (mainly online key retreival and registration). The Setup Project UserInterface templates seem inflexible and poorly documented so I am looking at opening a WinForm as a Custom Action.
I know this is possible because I see reference to it in many places but this is my first Windows Installer experience and so far it is mired in googled contradictions, partial or outdated information and guesswork... erg....
Does anyone have (even a pointer to) a clear concise description of how one gets this done in a VS 2008 WinForm project...
Many thanks for inputs
There is no guarantee that the .net framework is installed when the installer is launched (especially on Windows XP). A best practice is to keep your installer away from any dependencies.
Put the online key retrieval and registration in your application rather than doing all that stuff during install.
Create a standard installer class. In the class create your form and show it (ShowDialog is prefered)
Present:
The product development is done in Visual Studio at the moment using .Net technologies, so it's important to stay in the same set of tools. Roles apart from developers are using spreadsheets, docs and diagramming tools, photoshop to do their work.
Future:
We want to build a workflow (a sequential process with roles, queues for action items, passing on info from one role to the other, approval etc) for a product development. The software product will be in enhancement stage forever, more the reason to establish this flow.
Typical users are designers, business analysts, content creators, developers, code reviewers, testers.
Let's say a new webpage needs to be developed. It will be,
thought about by the analyst in the
tool, will enter the information in
some format
a designer will use drag and drop to
build the page look, pass it over to
the
content creator, who will add
content(help text, hyperlinks, pure
text etc) to the page
a developer will check his queue to start
building logic around this page and
make it functional.
I am thinking about Visual Studio Isolated shell to be used as a tool framework mainly due to it's IDE capabilities et al, to build this. Has anyone worked on a similar set of requirements? Any patterns/solutions/ideas around how to go about this in the VS Shell paradigm?
Update: Visual Studio Team System is already being used by the developers and testers, but there is no customized workflow for them (& analysts, designers etc) available in TFS. Also Visual Studio is not the place for non-dev users that want to do things like, - define navigation flow, design the page elements etc.
Sounds exactly like Microsoft Visual Studio Team System.
I think there is a market for this product as I could not find anything close. There are disparate tools and products but no unified IDE like experience available and needs to be built on our own.
VS Isolated Shell 2010 is the starting point and platform on which this can be built. Needs several man months and may be years. However TFS ALM application lifecycle management has several overlaps of features with this idea, although not all, because it doesn't provide a customized experience per your custom workflow.
Jury is out, needs figuring out.