# How to create a new worksheet in Excel

**URL:** <https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079>\
**Category:** Eggplant Functional\
**Tags:** excel\
**Created:** [September 3, 2024, 8:07am UTC](https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079 "2024-09-03T08:07:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raphaelRosin](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/r/b487fb/32.png) [@raphaelRosin](https://forums.eggplantsoftware.com/u/raphaelRosin)\
**Post date:** [September 3, 2024, 8:07am UTC](https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079/1 "2024-09-03T08:07:07Z")

</div>

Hello,  
Is there a way to create/copy worksheets within an existing Excel workbook? I would like to dynamically add new Excel sheets during execution.

I have looked at this [page](https://docs.eggplantsoftware.com/studio/stk-excel-file-interaction) but it does not have any info on creating new sheets, only accessing existing ones.

Thank you!

---

<div class="post-metadata">

**Author:** ![Karsten](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@Karsten](https://forums.eggplantsoftware.com/u/Karsten)\
**Post date:** [September 4, 2024, 12:24pm UTC](https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079/2 "2024-09-04T12:24:03Z")

</div>

Hey @raphaelRosin,  
Unfortunately this is not supported at the moment.  
Maybe we’ll have an early Christmas gift. 😉  
We’ll keep you posted.

In the meantime:  
What is your use case. Maybe we can find another solution to offer.

Cheers,  
Karsten

---

<div class="post-metadata">

**Author:** ![raphaelRosin](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/r/b487fb/32.png) [@raphaelRosin](https://forums.eggplantsoftware.com/u/raphaelRosin)\
**Post date:** [September 5, 2024, 8:22am UTC](https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079/3 "2024-09-05T08:22:51Z")

</div>

Thanks Karstem - I thought that might be the case. I’ve written a PowerShell script instead - See below if anyone has the same question!

param (

[string]$ExcelPath,

[string]$NewSheetName

)

$importFile = $ExcelPath

$excel = New-Object -Com Excel.Application

$workbook = $excel.Workbooks.Open($ExcelPath)

$worksheet = $workbook.Sheets.Add()

$worksheet.Name = $NewSheetName

$workbook.save()

$workbook.close()

$excel.Quit()

Write-Output “Process Complete”

---

<div class="post-metadata">

**Author:** ![Karsten](https://forums.eggplantsoftware.com/letter_avatar_proxy/v4/letter/k/e47c2d/32.png) [@Karsten](https://forums.eggplantsoftware.com/u/Karsten)\
**Post date:** [January 7, 2025, 1:09pm UTC](https://forums.eggplantsoftware.com/t/how-to-create-a-new-worksheet-in-excel/14079/4 "2025-01-07T13:09:18Z")

</div>

Hey @raphaelRosin,  
Eggplant 23.4.3 includes a lot of new excel commands. [Eggplant Functional 23 Release Notes | EPF Docs](https://docs.eggplantsoftware.com/studio/epf-v23-release-notes/#sensetalk-enhancements) and [Excel File Interaction | EPF Docs](https://docs.eggplantsoftware.com/studio/stk-excel-file-interaction)

```auto
put newWorksheet(myWorkbook, “Flowers”) into flowerSheet
set myNewSheet to workbook’s newWorksheet(name:”Summary”, sequenceNumber:2, copyFrom: worksheet(1) of workbook)
set anotherSheet to newWorksheet(workbook:myWorkbook, name:“CustomerList”)

```

You can now for example. create a new worksheet ,copy an existing one, rename them, set and get colors and many more.

Cheers,  
Karsten
