set excel cell value

Set a specific data into a designated cell in an Excel spreadsheet by specifying the cell’s address (e.g., A1, B2) and the desired value.
NameDescriptionTypeModifier
file path

The location of the Excel file.

StringNone
sheet

Name or index of the sheet within the Excel file where the action will be performed. (Index starts at 1)

StringNone
cell

Cell address (e.g., A1, B2)

StringNone
value

The value to enter into the Excel cell.

StringNone
None
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.
Example 1: Get excel cell value by sheet name
        
          	file path			
open excel workbook	D:\data.xlsx			
&nbsp				
	file path	sheet	cell	value
set excel cell value	D:\data.xlsx	Car Orders Data	D12	Ford Mustang Coupe
&nbsp				
	file path			
save excel workbook	D:\data.xlsx			
&nbsp				
	file path	auto save		
close excel workbook	D:\data.xlsx	true		
&nbsp				
        
    
Result
Example 2: Get excel cell value by sheet index
        
          	file path			
open excel workbook	D:\data.xlsx			
&nbsp				
	file path	sheet	cell	value
set excel cell value	D:\data.xlsx	1	F12	Apr 10 2010
&nbsp				
	file path			
save excel workbook	D:\data.xlsx			
&nbsp				
	file path	auto save		
close excel workbook	D:\data.xlsx	true		
&nbsp				
        
    
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.
  • If you need to save the changes of the excel file, use built-in action save excel workbook.
  • sheet argument:
    • If a sheet name has the value as a numerical text (e.g. the sheet name is 7), enclose the value in quotation marks to differentiate it from a numerical index value (e.g. "7").

Copyright © 2024 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