---
title: "Nội dung tệp mẫu dạng base64 cho Office.js (Excel insertWorksheetsFromBase64 / createWorkbook, Word insertFileFromBase64 / createDocument, PowerPoint insertSlidesFromBase64 / createPresentation)"
method: GET
path: "/excel/templates/{templateId}/content"
tags: ["ExcelTemplates"]
---

# Nội dung tệp mẫu dạng base64 cho Office.js (Excel insertWorksheetsFromBase64 / createWorkbook, Word insertFileFromBase64 / createDocument, PowerPoint insertSlidesFromBase64 / createPresentation)

`GET /excel/templates/{templateId}/content`

## Request

- Base URL: `https://api.fireant.vn`
- URL: `https://api.fireant.vn/excel/templates/{templateId}/content`
- Auth: OAuth 2
  - Implicit: `https://accounts.fireant.vn/connect/authorize`
  - Scopes: `user-data-read`
- TypeScript: <https://skmtc.dev/fireant/apis/fireant-restful-api/docs/excel/templates/:templateId/content/get.ts> (a function with typed inputs; its response is checked against the schema)

Yêu cầu xem được mẫu, đã đăng nhập và đủ hạng thành viên (hoặc là chủ sở hữu / admin).
Kèm fileFormat (xlsx, xltx, docx, dotx, pptx, potx), app và contentType (MIME) của tệp.
Không tự ghi nhận sử dụng - add-in gọi POST .../usages sau khi chèn / mở mẫu.

## Path parameters

- `templateId` integer, required

## Query parameters

- `token` string

## Response `200`

Thành công

- FireAntApiModelsExcelTemplatesExcelTemplateContent: Nội dung tệp mẫu dạng base64 - add-in dùng với Office.js (Excel: workbook.insertWorksheetsFromBase64 / Excel.createWorkbook; Word: insertFileFromBase64 / createDocument; PowerPoint: insertSlidesFromBase64 / createPresentation)
  - `templateId` integer: ID mẫu
  - `version` integer: Phiên bản tệp
  - `fileName` string: Tên tệp gốc khi tải lên
  - `fileFormat` string: Định dạng tệp = đuôi tệp: xlsx, xltx, docx, dotx, pptx, potx
  - `app` string: Ứng dụng của mẫu: excel | word | powerpoint
  - `contentType` string: MIME type của tệp (theo fileFormat)
  - `fileSize` integer: Kích thước (byte)
  - `fileHash` string: SHA-256 (hex chữ thường) của tệp - client dùng để cache theo phiên bản
  - `contentBase64` string: Nội dung tệp mã hóa base64

## Other responses

- `401`: Chưa đăng nhập
- `403`: Chưa đủ hạng thành viên (thông báo nêu gói cần có)
- `404`: Mẫu không tồn tại hoặc không xem được

## Changes

- **2026-10-10** `300cfd8b632c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fireant/apis/fireant-restful-api/changes/excel/templates/:templateId/content/get.md)

---

[API](https://skmtc.dev/fireant/apis/fireant-restful-api.md) - [All operations](https://skmtc.dev/fireant/apis/fireant-restful-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireant/apis/fireant-restful-api/revisions/c9b3aa855f95?raw)
