20
Views
1
Comments
GemBox.Spreadsheet: works standalone, doesn't work integrated with Outsystems
Application Type
Traditional Web

Hi,

My issue concerns the GemBox package of libraries.

There are two libraries:

  • GemBox.Document: for Word documents
  • GemBox.Spreadsheet for Excel worksheets

I've prepared a simple DLL with a class with two static methods. Both do the similar things:

  • set the license key
  • create a new object representing a Word document / an Excel worksheet

Below is the code:

    public class PureTest
    {
        public static string JustExcelTest()
        {
            SpreadsheetInfo.SetLicense(<here comes the key>);
            var wkb = new ExcelFile();
            return "JustExcelTest: success";
        }
        public static string JustWordTest()
        {
            ComponentInfo.SetLicense(<here comes the key>);
            var doc = new DocumentModel();
            return "JustWordTest: success";
        }
    }

Then I prepared a Windows Form test application that calls both methods. It works properly.

As a next step I prepared an Outsystems extension that references the same DLL as above and offers two actions calling the described methods. Finally I prepared a simple OS application (Traditional Web) that calls both actions.

This time the action referring Word documents works but the action referring Excel worksheets fails, saying that "The serial key is not valid". But the key itself IS valid because the standalone application works...

All three DLLs are included in the Integration Studio extension project (GemBoxTestyDLL is my "simple DLL"):

So, Word library works both in the local (Windows Form application) and server (OutSystems application) environments. But Excel library works in the local environment but fails in the server environment.

Both GemBox libraries come from the GemBox 2.7 Bundle package. I  know that it is definitely not the current version but I believe it shouldn't be important in this case (the libraries come from the same bundle).

Integration Studio version is 11.14.16. The extension is created by Visual Studio 2017, using .NET Framework 4.6.1 (all projects: extension, test DLL, test Windows Forms application). The OS environment is our on-premise environment (non-cloud).

Has anybody any suggestion how to understand, what's going on, and how to solve this issue?

Regards

Tomasz

2021-06-21 12-37-59
Wei Zhu

OutSystems already bundled with GemBox for ExcelToRecordList / RecordListToExcel function.
But the version is something old (i remember it is v3.3)

Because bundled version will always be used, so your license key (v2.7) are invalid for GemBox 3.3. 
I think your have two options
Option1. Get a license key for v3.3 or maybe above and try it
Option2. .NET Reflection to load your own library and try to use that assembly.

Regards
Wei

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.