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

Free Support Forum - aspose.com

Unable to open the thailand locale Excel document when exported from API

When i download the excel file from server. The downloaded excel (.xlsx) document is not opening, it throws error
“Excel cannot open the file ‘’*.xlsx” because the file format or file extension is not valid. verify the file has not been corrupted and that the file extension matches the format of file".

But when i download the same content in english locales the file opens. SO the issue is only thailand locale and also when thailand locale content is downloaded in pdf format the file is opened without any issues.

Can anyone please help in resolving the issue.

Thanks

@rashmiv1,

Thanks for providing us some details.

I do not think your issue is related to Aspose.Cells by any means. How do you export the file from server to client end (using e.g an Asp.NET application)? Do you use Workbook.Save() overloads involving HttpResponse object? Please provide compete details and sample code (runnable) to reproduce the issue on our end, we will check your issue by changing the regional/locale settings to Thailand.

Thanks for the quick respose,
Yes am using dot net application,Please find the details below:
to save the data am using
content type for xlsx is “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”;
MemoryStream ms = new MemoryStream();
SaveFormat sv;
wb.Save(ms, sv);
ms.Seek(0L, SeekOrigin.Begin);

@rashmiv1,

I am afraid, this won’t help much to trace the issue. Please create a simple ASP.NET project (runnable), zip the project and post us, we will check it soon.

Okay, i will create one sample application t download the excel and u[load it here soon.

one more information on this issue is if i try to open this file in notepad+ or try to open changing the file extention then the content it shows is {“message”:“The entry ‘’ already exists in the zip archive.”}.

Thanks

@rashmiv1,

Yes, please create a VS.NET sample project, zip the application and attach it here, we will check it soon. Also it looks like when you export the file from server to client end and try to open the file on the fly, it gives the error in thailand locale settings? By the way, when you save the file on the disk (instead), does the file open fine later on? Please also provide your exported file too.

PS. please try using our latest version/fix: Aspose.Cells for .NET v20.2.