> For the complete documentation index, see [llms.txt](https://xlswriter-docs.viest.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xlswriter-docs.viest.me/english/worksheet/first.md).

# Set as first worksheet

## **Function Prototype**

```php
setCurrentSheetIsFirst(): self
```

## **Example**

```php
$config = ['path' =>'./tests'];
$excel = new \Vtiful\Kernel\Excel($config);

$excel->fileName('hide.xlsx','sheet1') // Initialize the file and initialize the first sheet at the same time sheet1
    ->header(['sheet1'])       // insert data in sheet1 worksheet
    ->addSheet('sheet2')       // Add a new sheet sheet2, and set the current active sheet to sheet2
    ->setCurrentSheetIsFirst() // The current active sheet is sheet2, and set sheet2 as the first sheet
    ->output();
```
