Free Support Forum -

Aspose.Cells Deployment

I have upgraded to the latest version of Aspose.cells.

I have run set up and added a reference to the new version.

When i run one of the existing programs (written using the old version) I get an error saying that the new license is incorrect.

What do I have to do do to fix this.

Thank you for your help


If you want to use the older dll, then you do not need a new license. Just use your older license with your older versions of the product. But if you want to use the new license, then please use the newer dlls that fall inside your license subscription expiry date.

Thank you.

Thank you for answering. I think I may have phrased my question incorrectly. What I need to know is how I deply the new version onto the server, and what I have to do to any existing programs to ensure it uses the new version.

Thnak you


deply -= deploy


That should be pretty simple, you should copy the new Aspose.Cells.dll (new version) to place it on to your server location (replacing your older version). In your project, remove the older reference of Aspose.Cells under References node in Solution explorer. Now, Add Reference for Aspose.Cells to your new version, Rebuilt the project/solution, that is it.

Also check the documents in the section or sub-section, e.g

Let us know if you have any confusion.

Thank you.

I'm sorry I know i am being stupid but im still battling. I hav euninstalled the old cell version. Installed the new version using the supplied msi.

I have copied the new license to th relevanr folders on the server and i am still getting this error

The license is not valid for this product.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The license is not valid for this product.

Source Error:

Line 80:             Dim workbook As Workbook = New Workbook()
Line 81:             Dim license As Aspose.Cells.License = New Aspose.Cells.License()
Line 82:             license.SetLicense(Server.MapPath("~/Reports/Aspose.Cells.lic"))
Line 83:             Dim myConnection3 As OleDbConnection
Line 84:             Dim myCommand3 As OleDbCommand


Well, I suspect your license might be invalid, for example, you might be using JAVA license with .NET version or some other license with Aspose.Cells, or somebody changed the original license etc. You may open your license file into notepad and try to check if the license is valid or not.

If, you still in case, could not evaluate your issue, please mail your license, see the steps on how to send us the license file:

The license looks fine to me. See below

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

Developer Small Business
Limited to 1 developer.
This is not a non-redistributable license

Aspose.Cells for .NET




Well, I just copied the contents of your license file by opening notepad and save it as “Aspose.Cells.lic” in it. I now tested using the following code with the saved license file, it works absolutely fine with it. Here is my sample code and you may find attached the output file which is fine tuned.

Sample code:

Aspose.Cells.License license = new Aspose.Cells.License();
var workbook = new Workbook();
var i = workbook.Worksheets.Add();
var worksheet = workbook.Worksheets[i];
var cells = worksheet.Cells;

workbook.Worksheets.ActiveSheetIndex = i;

It looks strange to me why it is not working on your side. Could you create a sample “hello world” console application, zip it and post it here to reproduce the issue on our end, you don’t need to put the license file in the archive, we will check your issue soon.

Thank you.

I'm so sorry I have wasted your time - I searched each directory of my solution and finally found that the old Aspose.cells license was still in the Bin folder. Sorry.

While I am writing could you please advise how I can use the

cells[“A1”].PutValue(“testing”) command in the following code. I do not know how to intgrate a workbook designer with the worksheet.cells command.

Thank you for your help.

Dim con As OleDbConnection

Dim cmd1 As OleDbCommand

Dim da As New OleDbDataAdapter

Dim ds As New DataSet

Dim wd As WorkbookDesigner = New WorkbookDesigner()

Dim v1 = CStr(Request.Form(“Comment”))

Con =New OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0; Data Source=” & Server.MapPath("~/fpdb/passliabcapture.mdb"))


cmd1 = New OleDbCommand(“SELECT * FROM [Brokerrecon] WHERE [Comment] = Comment ORDER BY Comment, Rdate”, con)

cmd1.Parameters.Add(New OleDbParameter("@Comment", OleDbType.VarChar, 10))cmd1.Parameters("@Comment").Value = CStr(Request.Form(“Comment”))

da.SelectCommand = cmd1

ds = New DataSet()

da.Fill(ds, “Brokerrecon”)

Dim dt As DataTable = ds.Tables(“BrokerRecon”)

wd = New WorkbookDesigner() wd.Open(Server.MapPath("~/reports/brokerecon.xls"))


wd.Process(True)Dim name As String = Server.MapPath("~/reports/recon/" & v1 & “.xls”)

wd.Workbook.Save(“Report.xls”, FileFormatType.Default, Aspose.Cells.SaveType.OpenInExcel, Response)con.Close()


Good to know that your issue is resolved.

Regarding integrating the WorkbookDesigner with Workbook and its sub-objects, please see the following sample that may help you for your reference:


WorkbookDesigner designer = new WorkbookDesigner();
Workbook workbook = new Workbook(“e:\test2\Book1.xlsx”);
designer.Workbook = workbook;

Cells cells = workbook.Worksheets[0].Cells;
Aspose.Cells.Cell cell = cells[“A1”];


Dim designer As WorkbookDesigner = New WorkbookDesigner()
Dim workbook As Workbook = New Workbook(“e:\test2\Book1.xlsx”)
designer.Workbook = workbook

Dim cells As Cells = workbook.Worksheets(0).Cells
Dim cell As Aspose.Cells.Cell = cells(“A1”)

Hope, this helps.

Thank you.

Thank you for your help, Unfortunately Im sorry I'm still battling.

I have an existing designer worksheet.

Dim designer As WorkbookDesigner = New WorkbookDesigner()

Dim workbook As Workbook = New Workbook

which already displays data from an existing OLEDB

connection con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("~/fpdb/passliabcapture.mdb"))

con.Open()cmd1 = New OleDbCommand("SELECT * FROM [Brokerrecon] WHERE [Comment] = @Comment ORDER BY Comment, Rdate", con)

cmd1.Parameters.Add(New OleDbParameter("@Comment",OleDbType.VarChar, 10))

cmd1.Parameters("@Comment").Value = v1

da.SelectCommand = cmd1

ds = New DataSet()

da.Fill(ds, "Brokerrecon")

Dim dt As DataTable = dsTables("BrokerRecon")

designer = New WorkbookDesigner()



Dim name As String = Server.MapPath("~/reports/recon/" & v1 & “.xls”)
designer.Workbook.Save(“Report.xls”, FileFormatType.Default, Aspose.Cells.SaveType.OpenInExcel, Response)

The existing smart markers on the spreadsheet are referenced by @BrokerRecon.Fieldname

All I want to do is add the value of three input fields - which will form part of the headings/references on the sheet - from the .aspx form - into three cells on the spreadsheet generated by the existing code.

Dim designer As WorkbookDesigner = New WorkbookDesigner()

Dim workbook As Workbook = New Workbook(Server.MapPath("~/reports/brokereconind.xls"))

designer.Workbook = workbookDim v1 = CStr(Request.Form(“Comment”))

Dim start As Date = CDate(Request.Form(“From”))

Dim Finish As Date = CDate(Request.Form(“To”))

Dim cells As Cells = workbook.Worksheets(0).Cells

Dim cell As Aspose.Cells.Cell = cells(“B3”)


Dim cell1 As Aspose.Cells.Cell = cells(“B5”)


Dim cell2 As Aspose.Cells.Cell = cells(“B6”)


into cells B3, B5 and B6. I can do each seperately, but do not know how to combine the two sets of code to reproduce both the out pt on one sheet.


Well, I could not understand your issue. For your information, when you use designer.Process, now rows are inserted and values are pasted into the cells of the rows autocratically based on your markers in the sheet. So, if you need to modify any value or insert new values into your desired cells, you have to put your code under designer.Process line and before your Workbook.Save() line.

If you still could not evaluate, kindly create a sample console (runnable) application, zip it and post it here with all the files. We will check your issue soon.

Thank you.