5.0
5.0 | 1 rating Rate this file 23 Downloads (last 30 days) File Size: 4.28 KB File ID: #42054 Version: 1.1
image thumbnail

Delete worksheets in Excel file

by

 

03 Jun 2013 (Updated )

Delete selected worksheets or all empty worksheets in Excel file

| Watch this File

File Information
Description

Delete worksheets in Excel file

USAGE
xls_delete_sheets(xlsfile)
xls_delete_sheets(xlsfile,sheets)

INPUT
- XLSFILE: name of the Excel file
- SHEETS: cell array with the worksheet names, or matrix with positive integers to tell which worksheets are going to be protected. If SHEETS=[], all empty sheets will be deleted.

OUTPUT
- XLSFILE will be edited

Acknowledgements

Check If Xls File Is Open And Close It inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Other requirements MS Excel
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
24 Jun 2015 John Chow

Very useful. I use xlswrite with Worksheet Name as an input argument and always end up with 3 blank sheets at the beginning. This program delete all blank sheets.

Updates
03 Jun 2013 1.1

Added missing function

Contact us