xlsclose
Closes an Excel file opened through the command, xlsopen, and whose details are in data with functions defined in omlxlstoolbox. xlsclose is available only on Windows systems where Microsoft Excel is installed.
Syntax
R = xlsclose(data)
R = xlsclose(data, 'savefilename')
R = xlsclose(data, 'FORCE')
Inputs
- data
- Output of the xlsopen command, which contains details on the Excel file that needs to be closed.
- savefilename
- The filename to save the opened Excel file as. If the option 'FORCE' is used, the Excel file is forced closed.
Outputs
- R
- An empty struct to which the input can be reset to.
Examples
Close an open Excel file:
R = xlsopen('c:\test1.xlsx');
R = xlsclose(R)
R = struct [
]
Closes an open Excel file, after saving the contents to a different file:
R = xlsopen('c:\test1.xlsx');
xlsclose(R, 'c:\test2.xlsx');