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

Free Support Forum - aspose.com

Recent upgrade to V5.1.3 from V4.9.1 invalidates many commands

I recently upgraded to V5.1.3 and found that almost all of my code relating to Aspose.Cells is invalid. The line below:

excel.Save(strSaveAsFile, SaveType.OpenInExcel, FileFormatType.Excel97To2003, Me.Response)

Produces an error that states the command line is obsolete. Yet this is what is presented in the samples provided and Studio 2010 Intellisense prompts as well. When I do attempt to change the line to the 'accepted' method I get overload errors.

What happened, why the big changes, unless I installed the wrong version/feature, it looks as though the new version creates more work than it's worth.

HELP!


This message was posted using Aspose.Live 2 Forum

Hi Robert,

Please delete all "Reference" of the Aspose.Cells.dll from the project and then re-add the "Reference". Please make sure that you have selected the right path of the Aspose.Cells.dll.

I am pretty sure that this will solve the issue. If the issue persist, please feel free to reach us. Also, please send us the sample application, so that we can took into the issue thoroughly.

Thanks,

Hi,

Well, for the line:
excel.Save(strSaveAsFile, SaveType.OpenInExcel, FileFormatType.Excel97To2003, Me.Response)
this is obsoleted (you will not get intellisense for it in VS.NET, yet you may use it at the moment. This will be eliminated from the product completely after this year).

Please see the document for your complete reference:

Also, could you mention which samples you are talking about that are still using this line of code, we will update them soon.

Moreover, please check the documentation of the product for complete details, we spitted the api to move them to different namespaces now, some api are also renamed too.
check the documents:


( check “Notable Changes for Existing Users”):

Thank you.

That did not solve the issue. Here are the lines of code and the errors shown:

Dim excel As Workbook = New Aspose.Cells.Workbook (Type Aspose.Cells.Workbook not defined)

Dim strSaveAsFile As String = "FwdPipeline_NIIN_" & Mid(Request.QueryString("item"), 7, 9) & "_FY" & Mid(Request.QueryString("item"), 1, 4) & "_CAC_" & Mid(Request.QueryString("item"), 5, 2) & ".xls"

Dim path As String = MapPath(".")

path = path.Substring(0, path.LastIndexOf("\"))

Dim NIINFile As String = path + "\NIIN_info\fwd_pipeline.xls"

excel.Open(NIINFile) (Open() is obsolete, use workbook(string) constructor method instead)

Dim sheet As Worksheet = excel.Worksheets("Raw_Fwd_Pipeline_Documents")

sheet.Cells.ImportDataTable(XLSDataSet.Tables(0), True, 5, 0)

Dim cells As Cells = sheet.Cells

cells("A1").PutValue(Session("Item"))

cells("A2").PutValue(Session("Activity"))

excel.Save(strSaveAsFile, SaveType.OpenInExcel, FileFormatType.Excel97To2003, Me.Response) (this line is obsolete, use workbook.save method instead)

I paraphrased some of the error messages, but they're present throughout my project anywhere I call Aspose.Cells. I did remove/reset the reference to the .NET 2.0 DLL. I'm currently working with VS 2010.

Hi,

Please check my previous answer.

Also, check the following documents for your complete reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/opening-files.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/saving-files.html

These documents will help you how you can open and save the documents.

Thank you.

I noted your answer after I did my last post. I am going through my code and making the changes. The number of errors is dimishing. I’ll will let you know once I can compile cleanly and can pull a worksheet down from my development site.

Thanks the updated documentation helped out a lot. I’ve got my site operational with the latest version of your product. Thanks for the assist…

Hi,

Good to know that, have a nice day!