Link Search Menu Expand Document

SSpread.OpenExcel2007File Method

Explanation Imports the specified sheet in an Excel file.

Files that can be imported are in Excel 2007 or later format (xlsx).

The Reset method is called before importing and SSpread is initialized.

The format of the Excel file to be imported can be checked with the IsExcel2007File method and the password protection status.
Added since Ver.5.0.2
Call format OpenExcel2007File(URL or Reader, password, reserved, excelSheet)
Return value None
Arguments URL or Reader Excel2007 format file URL or Reader Object

If a URL is specified, the file will be cached on local computer for faster loading from the next time onwards.The latest files from the server by specifying an HttpResponse object. The latest files from the server can always acquired by specifying an HttpResponse object.
password Workbook password. Null or "" (empty string) if not needed
reserved Specify 0
sheet Sheet number starting from 0
Exception EXT-1 The argument of OpenExcel2007File is invalid.
EXT-24 No valid Reader object specified
EXT-28 An error occurred in the OpenExcel2007File method
Example of use
    var session = findHttpSession("http://example.com");
    var res = session.Get("/excelfile.xlsx");
    OpenExcel2007File(res, "Biz", 0, 0);
    
Related item IsExcel2007File, SaveExcel2007File methods
HttpResponse class