VSTO & .NET & Excel

August 13, 2014

Articles about installing softwares from SamLogic

I’m aware of the fact that I nowadays rarely make any posts here at all. One explanation is that I’m learning about new tools and that I find it very satisfaction and enjoyable.

Nevertheless, SamLogic, the Swedish vendor of Visual Installer and other excellent tools, have recently published some interesting articles which explain some important aspects when it comes to install softwares:

 

Happy coding everyone!

Dennis

Advertisements

February 28, 2013

Windows 8 – News and Solutions

Filed under: .NET & Excel, Apps for Office, Excel, Installation Tools — Dennis M Wallentin @ 5:18 pm

SamLogic have recently published some articles at their blog about Windows 8 and the news for it. Personally I have difficulties to work with Windows 8. Maybe I’m too old and simple don’t understand how wonderful the new UI actually is.

One thing we know for sure, when Microsoft designed Windows 8 it was not the desktop platform in focus. For me Windows 8 works well with smart devices and pads.

Anyway, here comes the links to each article:

 

Enjoy!

Kind regards,
Dennis

February 22, 2013

POEditor: An Excellent Translation Tool!

It’s very exceptionable that I get thrilled over a software. The last time must be the first version of Excel 2.1d, that’s nearly 30 ago, I got in my hand!

I can only say that it’s an excellent software and it’s also free. It’s so good that I say its speak for itself.

The URL to POEditor is: http://poeditor.com/

Enjoy!

Kind regards,
Dennis

January 9, 2013

SamLogic Visual Installer 2012 available in English!

Filed under: .NET & Excel, COM Add-ins, Excel, Installation Tools, SQL Server, VSTO & Excel — Dennis M Wallentin @ 3:18 am

In some earlier blog articles I have written about and mentioned Visual Installer 2012 from SamLogic, a Swedish Company. The key feature for Excel developers is that Visual Install 2012 can create professional installation programs for all Excel files and in particular for native add-ins as it can both install/activate as well as uninstalling add-ins in a very smooth way. Of course, it can handle both 32 bits and 64 bits versions.

For more information please see my blog article: Install and Activate Add-ins in Excel with SamLogic’s Visual Installer

The good news is that Visual Installer is now available in English too.

Screen shot of the Main Window of Visual Installer 2012:

VS2012

Visual Installer also includes a script commands that gives more control of the various processes upon installing and uninstalling softwares.

The following screen shot shows the help section for the script command to get any native add-in activated:

Excel Add-in

For more information about Visual Installer 2012 please see the following links:

Please note that the Excel add-in’s feature is only available in the professional version.

Kind regards,
Dennis

June 30, 2011

Code Signing Tool

Filed under: .NET & Excel, COM Add-ins, Excel, Installation Tools, VSTO & Excel — Dennis M Wallentin @ 11:04 pm

In my previously post I put in a nice word for COMODO Code Signing Certificate. In this blog entry I will introduce the tool, SignGUI to digitally signing solutions in an easy and smooth way.

SignGUI is a graphical front end for Microsoft’s SignTool.exe console utility. It’s free and can be downloaded from Briggs Softworks.

The following screen shot is rather self-explanatory and that’s all required in order to sign a solution. It’s also possible to create a template file that can be reused:

If I was to summarize these two blog entries about buying certificate and signing with digitally certificate it would be with two words: affordable and easy. What more can we require?

Kind regards,
Dennis

Update 07/27/2011:
K Software has released a free code signing tool, kSign, that is not depended on signtool.exe or signcode.exe. It’s available at the following URL for download: http://codesigning.ksoftware.net/

June 6, 2011

COMODO Code Signing Certificate

Filed under: .NET & Excel, COM Add-ins, Excel, Installation Tools, VSTO & Excel — Dennis M Wallentin @ 8:38 pm

During the last couple of years security has become more important. Today it plays a central role in many businesses around the world. As external consults we must be aware of it but perhaps more important is that we support it in a way that actually add more security to their business.

Through the years I have strongly advocated that all kind of software solutions should be digital signed with a Code Certificate. In that way customers know that the solutions come from secured and trusted vendors. After all, who wants to download and install softwares from “unknown”?

Within the online Excel developer community it still has not yet become a de facto standard to digitally sign any add-ins or individual workbooks with a certificate.

From what I can understand it’s related to the following:

  • It’s too expensive to buy.
  • It’s too difficult to configure and use a digital certificate.
  • “My customers don’t require it.”

I will start with the last item on the list. If the customers are not aware of it it’s difficult to require it, right? So instead of making a (wrong) conclusion I instead suggest that You try to educate the customers about software security in general and more specific about digitally signing of solutions. Personally I would appreciate it very much if an external consultant gave me an introduction to security.

The second argument is also something that can easily be fixed. It actually exist good guidelines and if we just follow them we would manage to both configure and use the digital certificate.

Finally the price level, for years many Excel developers say it’s too expensive to buy which also become a defence for not taking it seriously. At least, that’s my impression.

For years ago there existed a few vendors that wanted US$ 400 per year for a Code Signing Certificate. But time changes to the better even in this case. Today it exist several more vendors who offer a far better price than what many Excel developer claim it costs today.

To sum up, the list of “excuses” is no longer valid as I believe it exist an attractive solution for all of them.

Recently I found a new vendor who offer COMODO’s Code Signing certificate for a very attractive price. On the vendor’s site they also offer tools to be used with the Code Signing Certificate and also guidelines or link to guidelines on how to use certificate. And top of it, the vendor offers an excellent support.

I suggest You take a closer look at K Software‘s site which can be found at the following URL:

http://codesigning.ksoftware.net/

And as You will note when visiting their site; they explicit target small businesses.

Kind regards,
Dennis

Ps: I have no commercial interest in K Software’s business. My opinion about them is only from a very satisfied customer.

April 6, 2011

SuperOrca Tool

Filed under: .NET & Excel, COM Add-ins, Excel, Installation Tools, SQLite, VSTO & Excel — Dennis M Wallentin @ 11:12 pm

In a previously blog entry, The Orca Tool – A MSI Creator and Package viewer, I discussed the Orca tool for working with MSI Databases. The utility does its work so there is nothing to complain about. OK, one negative thing is that we must download the whole Windows SDK in order to get the tool.

Later on I discovered a non-Microsoft and a free utility with the name SuperOrca. It’s provided by Pantaray Research who is also the vendor of QSetup, an installation tool. The advantage with this tool compared with Orca is that it offers

  • a compare function (between two MSI packages),
  • a more powerful search function and
  • a better and more powerful scan function.

The following screen shot shows the main Windows of SuperOrca:

The tool is available for download together with its manual at SuperOrca.

Kind regards,
Dennis

October 17, 2009

Install and Activate Add-ins in Excel with SamLogic’s Visual Installer

Filed under: COM Add-ins, Installation Tools, Tools, VSTO & Excel — Dennis M Wallentin @ 1:10 am

In the first part of this post I discuss how to work with the collection of add-ins as well as individual add-ins in Excel when using VB.NET/VSTO. In the second part the installation tool Visual Installer will be discussed in terms of installing and activating native add-ins in Excel.

Part I – Add-ins
When working with add-ins we need to separate native add-ins and unmanaged/managed COM and VSTO add-ins from each other. In this example I use a VSTO add-in to call the collections and add-ins.

If we want to load, i.e. activate, an add-in during a session the code below shows how to do it:

Private Const m_sXLDATA As String = "Data.xlsm"
Private Const m_sXLAREPORT As String = "C:\Data\Report.xlam"
Private Const m_sXLAREPORT_DISPLAYNAME As String = "Report"

Private Sub Application_WorkbookOpen( _
                ByVal Wb As Microsoft.Office.Interop.Excel.Workbook) _
                Handles Application.WorkbookOpen

        Try
            If Wb.Name.ToString() = m_sXLDATA Then
                With Globals.ThisAddIn.Application
                    .AddIns.Add(Filename:=m_sXLAREPORT)
                    .AddIns(m_sXLAREPORT_DISPLAYNAME).Installed = True
                End With
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString())
        End Try

End Sub

Private Sub Application_WorkbookBeforeClose( _
                ByVal Wb As Microsoft.Office.Interop.Excel.Workbook, _
                ByRef Cancel As Boolean) _
                Handles Application.WorkbookBeforeClose

        Dim xlAddin As Excel.AddIn = Nothing

        Try
            If Wb.Name.ToString = m_sXLDATA Then
                For Each xlAddin In _
                Globals.ThisAddIn.Application.AddIns
                    If xlAddin.FullName = m_sXLAREPORT Then
                        xlAddin.Installed = False
                        Exit For
                    End If
                Next
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString())
        End Try

End Sub

As we can see it does not differ from how we do it in VBA. If we want to load a COM add-in or a VSTO add-in it can be done in the following way:

Private m_xlCOMAddins As Office.COMAddIns
Private m_xlCOMData As Office.COMAddIn

Private Const m_sXLDATA As String = "Data.xlsm"
Private Const m_sXLDATAANALYZE As String = "SQL Tester NET 2010.AddinModule"

Private Sub Application_WorkbookOpen( _
                ByVal Wb As Microsoft.Office.Interop.Excel.Workbook) _
                Handles Application.WorkbookOpen

        m_xlCOMAddins = Globals.ThisAddIn.Application.COMAddIns
        m_xlCOMData = m_xlCOMAddins.Item(m_sXLDATAANALYZE)

        Try
            If Wb.Name.ToString() = m_sXLDATA Then
                If m_xlCOMData.Connect = False Then _
                m_xlCOMData.Connect = True
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString())
        End Try

End Sub

Private Sub Application_WorkbookBeforeClose( _
                ByVal Wb As Microsoft.Office.Interop.Excel.Workbook, _
                ByRef Cancel As Boolean) _
                Handles Application.WorkbookBeforeClose

        m_xlCOMAddins = Globals.ThisAddIn.Application.COMAddIns
        m_xlCOMData = m_xlCOMAddins.Item(m_sXLDATAANALYZE)

        Try
            If Wb.Name.ToString = m_sXLDATA Then
                If m_xlCOMData.Connect Then _
                m_xlCOMData.Connect = False
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString())
        End Try

End Sub

Again, it does not differ from how it’s done in VBA.

Part 2 SamLogic’s Visual Installer
In the past I have made comments on various blogs and at Q&A forums about an installation tool that can help us with the installation and with the activation of native Excel add-ins in a smooth way. I finally decided to make a blogpost about this superb tool. I have been using it for years and so far I have not seen any other tool that makes it so easy to set up the installation instructions. The software I talk about is Visual Installer 2008 from the Swedish company SamLogic.

At present Visual Installer 2008 is available in Swedish but it can create set up packages in English. Anyway, whenever I need to distribute native add-ins and related files I use it. It also works great with .NET packages including managed COM add-ins.

For the demonstration purpose here I use an add-in with name Report.xlam. To set it up in Visual Installer it only requires one line (!) as the below screen shot show:

Visual Installer 2008

The command XLADDIN trigger Visual Installer to add the required entry in the Windows Registry. After the installation the entry exist in the Registry as the following screen shot shows (OPEN5):

Windows Registry Entry

When we uninstall the add-in the entry in the Windows Registry is silently removed. All in all, I find it to be an excellent companion.

Although I do not agree I know some VBA developers that have several Excel versions installed side by side. When using Visual Installer the add-ins are installed once but are registered for all available Excel versions on configurations with multiply versions installed.

The next version, i.e. Visual Installer 2010, will also support the 64-bits Windows platform as well as Windows 7.

Kind regards,
Dennis

April 17, 2007

Add-in Express 2007 for Microsoft .NET

Filed under: .NET & Excel, Installation Tools — Dennis M Wallentin @ 5:55 pm

Components and tools

I’m a power user of several third-party components and tools like:

In my experience, these components and tools have the following in common:

  • They are robust and rather easy to use.
  • Well documented with helpfile(s), examples and additional information at the vendor’s sites.
  • Good support with easy access and fast service.
  • Offer yearly subscriptions which give regular updated components.

The main reasons for me to use third-party components and tools are:

  • Cost effiency for my customers, i e less time is used in the development cycle and I can focus on the main task.
  • Makes me more competitive in bidding procedures.
  • Provide the customers with an attractive and end user friendly interface in my solutions.

Recently I have added a new tool to my toolbox – The Add-in Express 2007 for Microsoft .Net from Add-in Express Ltd. For the last weeks I’ve been working extensively with this tool and in my opinion it’s a great utility. It shares the common aspects with the other mentioned components and tools.

What is the Add-in Express .NET?
Add-in Express .NET is a developing tool for Visual Studio.NET to develop:

  • Office COM Add-ins (Excel 2000 and later)
  • Excel Automation Add-ins (Excel 2002 and later)
  • Excel Run-Time Data servers (RTD servers – Excel 2002 and later)
  • Smart Tags (Excel 2002 and later)

Per se it supports RAD (Rapid Application Development).

Compared with the built-in Shared Add-in in Visual Studio.NET Add-in Express offer several advantages like:

  • It can contain several add-ins in one assembly.
  • It can create version independed (neutral) Interop Assemblies (IA) that are automatically added to the setup project.
    In other words, we don’t need to consider which version of Excel is available or if any PIAs/IAs are available or not on the targeting machines. If needed we can add additional prerequisities to the Add-in Express projects in the usual way.
  • It uses its own ‘Shim’ to isolate Add-in Express projects from other add-ins.
    We don’t need to rely on the unsupported COM Shim Wizard from MSFT (which at present doesn’t support Excel 2007).
  • It can implement both RibbonX for Excel 2007 and Commandbars for version 2003 and earlier in the same project in a smooth way.
  • It can implement keyboard shortcuts at application level in an easy way.

The following screenshot shows Add-in Express Project Wizard’s start page for creating a new project:

adxcomaddin1.png

The following screenshot shows the next step in the Add-in Express Project Wizard where we can choose to use the ADX Loader or not.

wizard1a.png

If we choose to use the loader and the option to create the setup project the Add-in Express Project Wizard does the following:

  • Creates the setup project.
  • Creates the loader folder in the project’s folder and places adxloader.dll in it.
  • Generates adxloader.dll.manifest and places it in the loader folder.
  • Adds the project’s Primary Output to the setup project.
  • Adds the adxloader.dll and adxloader.dll.manifest to the setup project.
  • Generates customs actions that reference adxloader.dll.

The next screenshot shows the Wizard step where we can choose to add version independed (neutral) PIAs or not as well as using strong name or not.

wizard2a.png

The following screenshot shows the project as it is in the Solution Explorer window after we have finished the Project Wizard:

solutionexploreradx1.png

The “heart” of the Add-in Express projects is the Designer where we also can add additional components to the project. The following screenshot shows how it looks like after we have added some components (including the event component for Excel) to it:

adxaddinmodule.png

Deploying a solution’s setup project is straightforward:

  • Copy the setup.exe and the other files to the targeting machines and run the setup.exe
  • I use Visual Installer 2006 in which it’s easy to import setup projects and make a more customized installation package.

For more information please see Add-in Express 2007.

In an upcoming post I will present the VSTO development tool from Add-in Express Ltd.

Kind regards,
Dennis

Create a free website or blog at WordPress.com.