Can't save XLS to HttpResponse

I cannot see what this compilation error is complaining about. The argument types match up when hovered in Visual Web Designer. This is copied straight out of the HelloWorld example.

I have uploaded aspose.dll (v2) to the server (as described in http://www.aspose.com/docs/display/cellsnet/No+overload+for+method+Save+takes+4+arguments)

Please advise.

Matt


Compilation Error

Compiler Error Message: CS1502: The best overloaded method match for ‘Aspose.Cells.Workbook.Save(System.Web.HttpResponse, string, Aspose.Cells.ContentDisposition, Aspose.Cells.SaveOptions)’ has some invalid arguments

Source Error:

Line 177:
Line 178: createSpreadsheet(language, content).Save(Response,
Line 179: “translations_” + language + “.xls”,
Line 180: Aspose.Pdf.ContentDisposition.Attachment,
Line 181: new XlsSaveOptions(SaveFormat.Excel97To2003));

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

There are two separate dlls of Aspose.Cells for .NET, one is for client profile net framework and other is for normal net framework.

It seems, your issue is occurring because of one of these two reasons.

  1. You have normal net framework but you are using client profile dll.
  2. You have client profile net framework but you are using normal dll.

If you are using normal net framework, then please use the DLL under the directory “net2.0” and not “net3.5_ClientProfile”.

Also check the readme.txt under the directory
“Bin”.

Please see this image for more help. If you still face some issues, please feel free to post, we will like to help you asap.

Screenshot:

I found some extra information about the compilation error.

Argument 3: cannot convert from ‘Aspose.Pdf.ContentDisposition’ to 'Aspose.Cells.ContentDisposition’

Seems it was a simple fix.

Thanks

Matt

Hi,

Thanks for your feedback.

It means you are using some wrong enumeration. Although many enumration/structs/classes are similar in various Aspose components but since .NET framework forces strong-typed restriction, so you cannot use them interchangeably.

You must use the correct enumeration. We are pleased to know that you were able to sort out this issue.

Let us know if you face any other issue, we will be like to help you further.

Besides, we have lately done some major enhancements and added new features in our product, so you should also download and give a try to latest offline demos of Aspose.Cells which you can find from theses links.

These demos can work with Visual Studio 2005, 2008 or 2010. Please read the readme.txt file before running the demos.