Hello Dear Aspose team,
Currently We have one problem to be solved.
Currently We are using Aspose Version 4.8.1.3 in my dotnet code where in uploads the excel file and download the excel file whether it is Excel 2003 or Excel 2007 i.e (.Xls,.Xlsx).Currently we are trying to download the records more than 100k from grid ,for the same I have modified the code in my application and i have added filename with extension .Xlsx (which is support to unlimited records ,for my current requirement) and I ran my code as well ,and I able to download the Excel 2007 format i.e .XLSX(After add the extension .Xlsx in my code).Earlier it was .Xls extension with application name.
After download the Excel file I am not able to open the Excel file(Which I have downloaded from grid).When I am trying to open the file it's give me the error saying that
"Excel cannot open the file "ParameterList.xlsx" because the file format or extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."
I am pasting the code below,Which is generating the excel file.
if (dtSRCLV != null)
{
MemoryStream strmExcelFile = (MemoryStream)objConverter.ConvertSRCLVToExcel(dtSRCLV);//export to excel
Response.Clear();
Response.Buffer = true;Response.ContentType = "application/vnd.ms-excel";Response.Charset =
"";this.EnableViewState = false;Response.AddHeader(
"Content-Disposition", "attachment; filename=\"ParameterList.xlsx\"");//Supporting Excel2007 for download
////Response.AddHeader("Content-Length", strmExcelFile.Length.ToString());
//Response.ContentType = "Application/msexcel";
Response.OutputStream.Write(strmExcelFile.ToArray(), 0, (int)strmExcelFile.Length - 1);Response.Flush();
Please look into on this ASAP.Pleas let me know if you need any clarifications regarding the same.
Regards
Sreenivas
This message was posted using Aspose.Live 2 Forum