Hi,
We are using XSLT to generate XLS report output in our project using some custom code. Now we want the same output in XLSX format. Please note that we are currently not using Aspose for this.
As we apsose for our other reports; is there anything in aspose which can help us on this? We are not in a opinion of updating XSLT file. If there is some easy way out in aspose, please let us know. Might be something like we will generate the files in XLS only as per our earlier logic and later convert them to XLSX using Aspose.
thanks in advance…!!
Hi,
thanks for your reply.
Now this is our final piece of code which generates results.xls. I have tried saving the file as xlsx but did not work. Can you please tell how to write that code for integrating transformations from xls to XLSX??
private void DownloadFile(string filePath, string filename)
{
if (filename == string.Empty)
{
filename = “results.xls”;
}
Response.Buffer = true;
Response.ContentType = “application/vnd.ms-excel”;
// Response.ContentType = “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”;
Response.AddHeader(“content-disposition”, “attachment;filename=” + filename);
Response.TransmitFile(filePath);
Response.Flush();
Response.End();
}
After this function; we directly see the excel file popped up in browser.
Hi,
Before I got reply from you; this piece of code worked at my end.
Workbook wk = new Workbook(filePath);
wk.Save(filePath, SaveFormat.Xlsx);
I have added the same before Response.TransmitFile(filePath) and it worked.
Please let us know if there is any better/alternate way of doing this.
Many Thanks for your help…!!!
Hi,
Hi,
As mentioned earlier, the following piece of code works fine with us.
Workbook outputWorkbook = new Workbook(filePath);
outputWorkbook.Save(filePath, SaveFormat.Xlsx);
But in few cases we get error in the second line while Saving that the file is used by another process. this only happens in few cases…
Is there anything like workbook.Close(), Quit() before we save the same as XLSX?
Hi,
Hi,