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

Free Support Forum - aspose.com

Trying to stream back an XLSX to webclient via a an ActionResult

The .xlsx file is downloading, but opening says invalid format. I’ve also opened the file directly from site (not then downloaded) and it works fine.

Response.AddHeader(“Content-Disposition”, $“attachment; filename={path.Substring(path.LastIndexOf(’\’)+1)}”);
return File(path, “application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”);

Please share your sample Excel file and a simplified complete runnable solution to reproduce this issue here. We will analyze it and share our feedback accordingly.