Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon Feb 04, 2019 11:48 am


I have an urgent issue with Spire XLS inside a console application (.NET 4.6.2)

Code: Select all
 var filename = "Triggers.xlsx";           

  Spire.License.LicenseProvider.SetLicenseKey("OUR KEY");

            var workbook = new Workbook
                Version = ExcelVersion.Version2016

            var sheet = workbook.Worksheets[0];
            sheet.Range["A1"].Text = "HELLO";
            workbook.SaveToFile(filename, ExcelVersion.Version2016);

Crashes with

'The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters’

This is being run under 64 bit with Spire 9.1.22

Whats the problem? I need this to be working reliably asap! This is really frustrating as its such a simple task I am giving it!



Posts: 1
Joined: Tue Aug 15, 2017 5:09 pm

Tue Feb 05, 2019 5:10 am

Hi Paul,

Thanks for your inquiry.
The error is because you used wrong license key. You could comment out the code "Spire.License.LicenseProvider.SetLicenseKey("OUR KEY");" to check simply the result. Kindly note the correct license key is the value/string of the Key attribute of the element License of your license xml file. Please use correct key to remove the warning information.

E-iceblue support team
User avatar

Posts: 3067
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS