---
name: File List to Excel
slug: file-list-to-excel
category: Automation
description: Given a directory path, this skill exports all filenames in that directory to an Excel spreadsheet. Useful for creating file inventories and cataloging folder contents.
github: "https://github.com/CoderWanFeng/python-office/tree/develop/skills/file/output_file_list_to_excel"
language: Python
stars: 1331
forks: 297
install: "git clone https://github.com/CoderWanFeng/python-office"
added: 2026-07-20T06:48:43.979Z
last_synced: 2026-07-28T07:00:50.569Z
canonical_url: "https://dirskills.com/skills/file-list-to-excel"
---

# File List to Excel

Given a directory path, this skill exports all filenames in that directory to an Excel spreadsheet. Useful for creating file inventories and cataloging folder contents.

**Install:** `git clone https://github.com/CoderWanFeng/python-office`

## README

# output_file_list_to_excel Skill

> 整理当前文件夹下的文件名到一个 Excel 里

## 功能描述

将指定目录下的所有文件名整理到一个 Excel 文件中。

## 所属分类

`office/skills/file/output_file_list_to_excel/`

## 调用方式

```python
from office.skills.file import output_file_list_to_excel

output_file_list_to_excel(dir_path='./data')
```

## 参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| `dir_path` | str | 是 | - | 目录路径 |

## 返回值

`None`

## 使用示例

```python
from office.skills.file import output_file_list_to_excel
output_file_list_to_excel(dir_path='./我的文件夹')
```

## 原始函数

`office.api.file.output_file_list_to_excel`
