get excel worksheet count

Retrieve the total number of worksheets that reside in the specified Excel workbook.
NameDescriptionTypeModifier
file path

The location of the Excel file.

StringNone
variable

(Optional) Variable to receive the returned value.

StringNone
Total number of worksheets (include hidden sheets) that reside in the specified Excel workbook.
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
        
file path
open excel workbookD:\data.xlsx
 
file pathvariable
get excel worksheet countD:\data.xlsxcount
 
file pathauto save
close excel workbookD:\data.xlsxfalse
 
Result
  • This action only supports Excel extensions: .xls, .xlsx, .xlsm.
  • You need to use built-in action open excel workbook before proceeding with this action.

Copyright © 2025 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1 (650) 572-1400