i have use this code
workbook.Save(HttpContext.Current.Response, "AssetReportTemplate.xlsx", ContentDisposition.Attachment, new OoxmlSaveOptions(SaveFormat.Xlsx));
HttpContext.Current.Response hold my current worksheet.
please tell me how to save this excel file in my loacl disk when i click download button
Hi Anuj,
Thank you for considering Aspose products.
You simply can use the overload version of Workbook.Save method that accepts string type parameter for file path location to save the workbook to disk.
If I am wrong in my understanding then please provide more details of your scenario so we could provide further guidance in this regard.
when i using workbook.Save("C:\\book1.xlsx") for 100000 rows and 60 column then getting error is
Exception of type 'System.OutOfMemoryException' was thrown.
please send me solution it's urgent.either
Please send me one example for 100000 rows and 60 columns.
Hi Anuj,
Thank you for your response.
I have evaluated your presented scenario with below provided source code snippet and latest version of Aspose.Cells for .NET (Latest Version). I am afraid, I haven’t observed an exception, and the output was saved fine. Please note, the resultant file is of 60MB in size.
C#
var book = new Workbook(FileFormatType.Xlsx);
var sheet = book.Worksheets[0];
var cells = sheet.Cells;
var random = new Random();
for (int row = 0; row < 100000; row++)
{
for (int column = 0; column < 60; column++)
{
cells[row, column].PutValue(random.Next());
}
}
book.Save(myDir + “output.xlsx”);
I would request you to please give the latest version a try on your end. In case your problem persists, please provide the runnable source code snippet if your are creating the workbook from scratch otherwise please also provide your template file in case you are using any.
Hi,
i have template which i attach this Replay.
In this templete Four sheet ,All the sheet data fill very well but when i saving the same on server then we getting problem on saving , as discused above.
My requirement -
1. When i creating the file using aspose, then i want to save this file onto physical location on my server as well as want to show as popup to save this file to the user.
2. Reason to save this file on the server physical location is - i want to save this file , for future use the same.
Hi Anuj,
Thank you for sharing your template file.
I have used your template spreadsheet to fill up random data in all 4 worksheets using the similar code snippet as shared in my previous reply. Once data is in place, I have saved the resultant workbook in both XLS and XLSX formats without observing any exception on my end.
As we are unable to replicate the issue with latest version of Aspose.Cells component, we need a sample application exhibiting the issue so that we could isolate the problem cause and move forward to fix it for you. Please also provide details of your environment such as,
- Operating System version
- Service Pack version
- Architecture (32 bit/64 bit)
- .NET Framework version
Hi,
please share code for save 4 worksheets in excel file .
my requirement is excel file is save my disk then popup will be open for ask open,save,cancel.
??
Please Give me solution urgent basic because i have to plane to purchase .
Hi,
Please provide solution as discussed above.
Hi Anuj,
Please use the following line of code to pop-up the Open/Save dialog box in order to prompt the user.
C#
book.Save(this.Response, “output.xlsx”, Aspose.Cells.ContentDisposition.Inline, new Aspose.Cells.OoxmlSaveOptions(Aspose.Cells.SaveFormat.Xlsx));
Please note, I have changed the ContentDisposition type from Attachment to Inline for your requirement. It will prompt the user to either open the file or save it on disk as shown in the attached snapshot form IE9.
Hi,
When I'm writing data in excel with 100 columns and 100000 rows using aspose service then it's taken very long time to write & save data in excel.
Time taken:
1. Writing data in excel : 1.55 Minute (minimum)
2. Saving File : 1 Minute(minimum)
Provide me the Solution how to reduce the time to write & save data in excel using aspose service?
Thanks
Anuj
Hi Anuj,
Thank you for your response.
Well, if you are creating such a huge file (10000x100 matrix) then it will definitely take some time for creation and additional time for saving the results to disk. I am not aware of your application’s internal logic but if you are filling the data cell by cell then please consider populating the data first by row then by column, this little tweak will certainly improve the overall performance to certain extent. Source code snippet shared here follows this rule.
Hi,
I am using Aspose service in my application but i am not sure how many users at time access my application.My requirement is 100 user access my service at a time ,please conform me it's possible or not?
Hi,
Aspose.Cells is a pure .NET component created in managed C#, so , concurrency and multithreading is not a problem by any means. Our several users do use the component in their diverse environments in different types of (desktop, client server etc.) solutions (Winforms, web forms, windows/web service, console app. etc.) or other scenarios without any problem. As long as you don’t have shared data source and every time a user access the application a new Workbook or Excel file is generated, there would be no problem at all. However, if you have a shared data/resource, then you will have to do synchronization by yourself. Also, in that case, we recommend you to create/manipulate of filling data into different workbooks in different threads accordingly, because, you should not use one workbook/file in multiple threads at the same time least you would not get stable data.
Thank you.