File Exchange

image thumbnail

Delete worksheets in Excel file

version 1.1 (4.28 KB) by

Delete selected worksheets or all empty worksheets in Excel file

18 Downloads

Updated

View License

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

Comments and Ratings (1)

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

1.1

Added missing function

MATLAB Release
MATLAB 7.10 (R2010a)
Acknowledgements

Inspired by: Check if XLS file is open and close it

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video