Aspose.Cells makes it possible to manipulate files. This article explains the various ways in which files can be saved to a response object.
Saving File to Response Object
It is also possible to generate a file dynamically and send it directly to a client browser. In order to do so, use a special overloaded version of the Save method that accepts the following parameters:
The ContentDisposition enumeration determines whether the file being sent to the browser provides the option to open by itself directly in the browser or in an application associated with .xls/.xlsx or another extension.
The enumeration contains the following pre-defined save types:
Type
Description
Attachment
Sends the spreadsheet to the browser and opens in an application as an attachment associated with .xls/.xlsx or other extensions
Inline
Sends the document to the browser and presents an option to save the spreadsheet to disk or open inside the browser
XLS Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Due to the object “System.Web.HttpResponse” which is not included in .NET5 and .Netstandard,
So this function does not exist in Aspose.Cells .NET5 and .Netstandard version, you can refer to the following code to save the file to the stream, then do operation to the stream.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters