Spread ASP.NET 16
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / FpSpread Class / SaveExcel Method


In This Topic
    SaveExcel Method
    In This Topic
    Saves the contents of the Spread component to the specified Excel file in a stream.
    Saves the contents of the Spread component to Excel format (BIFF8).
    Overload List
    OverloadDescription
    Saves the contents of the Spread component to the specified Excel file in a stream.  
    Saves the contents of the Spread component to the specified Excel file in a stream.  
    Saves the contents of the Spread component to the specified Excel file in a stream keeping track of warnings.  
    Saves the contents of the Spread component with the specified parts to the specified Excel file in a stream.  
    Saves the contents of the Spread component with the specified parts to the specified Excel file in a stream.  
    Saves the contents of the Spread component to the specified Excel file in a stream, keeping track of warnings.  
    Saves the contents of the Spread component to the specified Excel file in a stream, keeping track of warnings.  
    Saves the contents of the Spread component to Excel in the specified file.  
    Saves the contents of the Spread component to Excel in the specified file.  
    Saves the contents of the Spread component to Excel in the specified file keeping track of warnings.  
    Saves the contents of the Spread component to Excel in the specified file and whether to include headers.  
    Saves the contents of the Spread component to Excel in the specified file and whether to include headers and keeps track of warnings.  
    Saves the contents of the Spread component with the specified parts to Excel in the specified file keeping track of warnings.  
    Saves the contents of the Spread component with the specified parts to Excel in the specified file keeping track of warnings.  
    Saves the contents of the Spread component to Excel in the specified file including the specified parts.  
    Saves the contents of the Spread component to Excel in the specified file including the specified parts.  
    Remarks

    These methods provide various ways to save data to an Excel file. You can specify the path and file name, whether to include the headers, and a list of the warnings.

    These methods save the contents of the sheets of the component to a Microsoft Excel-compatible BIFF (Binary Interchange File Format) file. BIFF8 (Binary Interchange File Format, version 8 from Microsoft) is the file format for several versions of Microsoft Excel (Excel 97, Excel 2000, and Excel XP). Use the UseOOXMLFormat option in the ExcelSaveFlags enumeration to save to the xlsx format.

    Document caching (ExcelSaveFlags) allows users to open, edit, and save without the loss of advanced document content and formatting. The content can be lossless only if the opening file format is similar to the saving file format. If the advanced document content uses files besides the xls(x) file, then the additional files need to be in the same folder with the xls(x) file. Advanced content could be macros, ActiveX controls, data connections, etc.

    In order to keep any document caching settings (changes would be lost during a postback), open the original file with the document caching only setting and then save the file using the document caching setting.

    The memory stream must be able to seek when saving to a BIFF8 formatted file using a memory stream.

    Make sure that none of the sheet names (SheetName property) have characters that are considered invalid sheet names in Excel. The following characters are invalid for Excel sheet names:

    ?     (question mark)
    /     (forward slash)
    \     (backward slash)
    *     (asterisk)
    [     (left bracket)
    ]     (right bracket)

    See Also