[DataDriven] Change sheet of an Excel file

Hello!

Version
Katalon 5.4.2.

**Problem
**I try to change a sheet of my Excel file with the script view.
My current code is

import static com.kms.katalon.core.testdata.TestDataFactory.findTestDataimport com.kms.katalon.core.testdata.ExcelDataExcelData data = findTestData("Data").changeSheet("SheetA")

However data value is null.

Someone has any idea?

Thank’s,

**Solved
**changeSheet(“SheetA”) is a void method.

**New code:
**

ExcelData data = findTestData("Data")changeSheet("SheetA")
2 Likes

Hi there,

Still getting it as deprecated…

ExcelData TD1 = findTestData(“testdata(1)”)

changeSheet(“Sheet2”)

please help…

Is there a working solution

Yes this worked for me