> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/create-empty-excel.md).

# Create empty excel

Create empty excel là hành động dùng để khởi tạo một file Excel hoàn toàn mới (định dạng `.xlsx`) và trống rỗng tại một đường dẫn được chỉ định trên máy tính của bạn.

Hành động này thường được đặt ở đầu kịch bản để chuẩn bị một file lưu trữ sạch sẽ trước khi các hành động cào dữ liệu (Data Crawler) hoặc ghi nhật ký bắt đầu đẩy thông tin vào.

🎥 Xem thêm video hướng dẫn: [Tại đây](https://youtu.be/EH7olDLAb9c).

#### Tham số cấu hình:

* File Path: Đường dẫn tuyệt đối bao gồm cả tên file và đuôi `.xlsx` nơi bạn muốn tạo file (Ví dụ: `D:\GPM\data_crawler.xlsx`).

#### Ví dụ thực tế: Khởi tạo file xuất dữ liệu trước khi cào bài viết

Giả sử bạn đang viết một kịch bản tự động lướt các hội nhóm và thu thập (cào) liên kết bài viết, lượt tương tác để phục vụ nghiên cứu thị trường. Trước khi vòng lặp cào dữ liệu bắt đầu chạy, bạn cần có sẵn một file Excel trống để lưu kết quả.

* Cách cấu hình: Ở bước đầu tiên của kịch bản, bạn gọi hành động Create empty excel.
  * File Path: Điền đường dẫn `D:\GPM\ketqua_facebook.xlsx`.
* Kết quả:
  * Nếu tại thư mục `D:\GPM\` chưa có file `ketqua_facebook.xlsx`, hệ thống sẽ lập tức tạo ra một file Excel trống.
  * Nếu file đã tồn tại từ trước, hệ thống sẽ xóa file cũ và tạo lại một file trống hoàn toàn mới để đảm bảo dữ liệu của đợt chạy trước không bị lẫn lộn vào đợt chạy này.

Sau bước này, bạn có thể yên tâm sử dụng các hành động như Write excel file hoặc Append excel file để ghi dữ liệu vừa cào được vào file.

<figure><img src="/files/Z1TEZM5qPFr1Bfi3DUED" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/create-empty-excel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
