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

Free Support Forum - aspose.com

Problem opening worksheets

Hello. We've been using Aspose.Cells since August for our application and had no issue with opening a worksheet. I noticed a new version about 2 weeks ago and upgraded. Now, we can Save a worksheet with no problem, but can't Open it. The version I upgraded to is 4.1.0.0.

Thanks

Lisa

Hi Lisa,

This problem may be related to your file and code. Is it possible to post a simple console project to show your problem? That will help us to figure out the problem. Thank you very much.

Hi Laurence,

Here's the code where we're trying to open the workbook. This code worked before we upgraded our version of Cells. The file can be saved and opened later just fine. And, what is even more odd is when the dialogue box pops up to Open, Save or Cancel, if you click Open, Excel opens and you get an error " 'C\TEMP\Temporary Internet Files\COntenr.IE5\64EXJKT8\CVREport_11706_1034[1].xls' count not be found. Check the spelling of the file nane and verify that the file location is correct." If you click OK on this but don't close excel then try to do the open again, it works.

Workbook workbook = ExportService.Service.DetailReportExport(creative, dataSource, thumbnailFile);

String excelFile = "CVReport_" + DateTime.Now.ToString("MMddyy_HHmm") + ".xls";

workbook.Save(excelFile, FileFormatType.Default, SaveType.OpenInExcel, Response);

Hi,

Thanks for considering Aspose.

Could you create a sample test project with a template output file and post us here. So that we may resolve the issue.

Thank you.

Regards

Amjad Sahi

Aspose Nanjing Team

Hi Lisa,

We found and fixed a problem that may be related to this issue. Please try this attached version.

If it still doesn't work, please post your file and sample project here to show the problem. Thank you very much.

Hi Laurence,

Thanks for the fix. That didn't correct our problem, but we found a work around.

We added

Response.Clear();

Response.ClearHeaders();

To the code before we do the save and that seemed to do the trick. I've had the code working for over a month without those 2 lines, but all of a sudden they became necessary.

So, now our code reads:

Response.Clear();

Response.ClearHeaders();

String excelFile = "CVReport_" + DateTime.Now.ToString("MMddyy_HHmm") + ".xls";

workbook.Save(excelFile, FileFormatType.Default, SaveType.OpenInExcel, Response);

Thanks

Lisa