We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error when generating Excel file with password

Hi,

I’m having an issue with Aspose Cells for Reporting Services. When I export in format Excel2007xlsx and open the file in Excel I get an error Excel Cannot open the file ‘xxxx.xlsx’ because the file format or file extension is not valid.

image.png (3.4 KB)

This only occurs when I set a password for the file in the configuration file as follows:

If I omit the password (I can leave all other settings the same) the file opens okay. We need the password to work. This is with version 21.11 of Aspose Cells for Reporting Services. We currently use version 19.5.4 and this works fine with no error (on SSRS 2016). We are migrating to a new server running SSRS 2019 and so are looking to move to the latest version. This is running as an evaluation version currently on the new server as we are in the process of renewing our support agreement.

The entire contents of Aspose.Cells.Reporting.Services.xml is below.

<?xml version="1.0" encoding="utf-8"?>

@andrewchaines,

Please provide RDL, Aspose.Cells.ReportingServices.xml file to demonstrate the issue, we will check it soon.

PS. please zip the files prior attaching here.

Ah, I did try attaching. Didn’t think to zip them. Attached below. Let me know if any issue. I’ve attached an example report file but I get the same with any of our reports.

files.zip (2.3 KB)

@andrewchaines,

Thanks for the resource files.

Please notice, we have logged a ticket with an id “CELLSRS-614” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@andrewchaines,

We found and fixed it.
We are enclosing Aspose.Cells.ReportingServices.dll(21.11.1) and please try it.Aspose.Cells.ReportingServices.21.11.1.dll.zip (5.6 MB)

@wangtao

I’ve added the dll to replace the existing one. It was in a lot of folders in the Aspose folder and also in the reporting services bin folder. I’ve replaced the existing .dll with the one you provided. I get a new issue now, non of the Aspose download types appear. I’ve checked the log file on reporting services (attached) and it reports the error at the bottom of this message. It seems to be failing to load the dll.

Please can you have a look.

ReportingServicesService_2021_12_02_07_52_33.zip (8.0 KB)

extensionfactory!ReportServer_0-1!2698!12/02/2021-07:52:59:: e ERROR: Exception caught instantiating ACXLS report server extension: System.IO.FileLoadException: Could not load file or assembly ‘Aspose.Cells.ReportingServices, Version=21.11.1.0, Culture=neutral, PublicKeyToken=e6b46033861b5318’ or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)
File name: ‘Aspose.Cells.ReportingServices, Version=21.11.1.0, Culture=neutral, PublicKeyToken=e6b46033861b5318’ —> System.Security.Policy.PolicyException: Execution permission cannot be acquired.

@andrewchaines,
Could you tell us your installation version ( Aspose.Cells.ReportingServices.msi or Aspose.Cells.ReportingServices_x64.msi)?
We will provide a fixed installer to fix it.

Hi @wangtao,

it’s Aspose.Cells.ReportingServices.msi that I used.

Thanks

@andrewchaines,

Please try Aspose.Cells.ReportingServices.msi(21.11.1) .

Thanks @wangtao, that works perfectly now.