Excel & CSV
Read, write, merge, split, and transform spreadsheet data
17 endpoints in this category. All require X-API-Key header.
Excel Add Rows
/api/ExcelAddRows
1 token
Add rows to an Excel worksheet.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheet |
string | optional | Sheet name or index |
rows |
array | required | Array of row arrays or objects |
startRow |
number | optional | Insert position |
Request Example
{"file": "<base64-xlsx>", "rows": [["Name", "Email"], ["John", "john@test.com"]]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetName": "Sheet1", "rowsAdded": 2, "totalRows": 42}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelAddRows" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "rows": [["Name", "Email"], ["John", "john@test.com"]]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""rows"": [[""Name"", ""Email""], [""John"", ""john@test.com""]]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelAddRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelAddRows"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "rows": [["Name", "Email"], ["John", "john@test.com"]]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelAddRows
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "rows": [
│ [
│ "Name",
│ "Email"
│ ],
│ [
│ "John",
│ "john@test.com"
│ ]
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelAddRows"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Delete Rows
/api/ExcelDeleteRows
1 token
Delete rows from an Excel worksheet.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheet |
string | optional | Sheet name |
rows |
array | required | Array of row numbers to delete (1-indexed) |
Request Example
{"file": "<base64-xlsx>", "rows": [2, 3, 4]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetName": "Sheet1", "rowsDeleted": 3, "originalRowCount": 42, "newRowCount": 39}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelDeleteRows" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "rows": [2, 3, 4]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""rows"": [2, 3, 4]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelDeleteRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelDeleteRows"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "rows": [2, 3, 4]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelDeleteRows
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "rows": [
│ 2,
│ 3,
│ 4
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelDeleteRows"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Extract Rows
/api/ExcelExtractRows
1 token
Extract rows as JSON.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheet |
string | optional | Sheet name |
hasHeaders |
boolean | optional |
First row has headers
(default: true)
|
startRow |
number | optional |
First row to read, 1-based
(default: 1)
|
endRow |
number | optional | Last row to read; the worksheet's last row when omitted |
Request Example
{"file": "<base64-xlsx>", "hasHeaders": true}
Response Example
{"rows": [{"Name": "John", "Email": "john@test.com"}], "rowCount": 1}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelExtractRows" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "hasHeaders": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""hasHeaders"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelExtractRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelExtractRows"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "hasHeaders": true}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelExtractRows
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "hasHeaders": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelExtractRows"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Update Rows
/api/ExcelUpdateRows
1 token
Update specific cells in an Excel worksheet.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheet |
string | optional | Sheet name |
updates |
array | required | Array of {row, col, value} |
Request Example
{"file": "<base64-xlsx>", "updates": [{"row": 1, "col": 1, "value": "Updated"}]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetName": "Sheet1", "cellsUpdated": 6}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelUpdateRows" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "updates": [{"row": 1, "col": 1, "value": "Updated"}]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""updates"": [{""row"": 1, ""col"": 1, ""value"": ""Updated""}]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelUpdateRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelUpdateRows"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "updates": [{"row": 1, "col": 1, "value": "Updated"}]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelUpdateRows
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "updates": [
│ {
│ "row": 1,
│ "col": 1,
│ "value": "Updated"
│ }
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelUpdateRows"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Find & Replace
/api/ExcelFindReplace
1 token
Find and replace text in cells.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
find |
string | required | Text to find |
replace |
string | required | Replacement text |
worksheet |
string | optional | Specific sheet |
Request Example
{"file": "<base64-xlsx>", "find": "old", "replace": "new"}
Response Example
{"success": true, "file": "<base64-xlsx>", "replacedCount": 12}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelFindReplace" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "find": "old", "replace": "new"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""find"": ""old"", ""replace"": ""new""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelFindReplace", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelFindReplace"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "find": "old", "replace": "new"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelFindReplace
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "find": "old",
│ "replace": "new"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelFindReplace"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Merge Files
/api/ExcelMergeFiles
1 token
Merge multiple Excel files into one.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files |
array | required | Array of base64 Excel files |
Request Example
{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetCount": 3, "worksheetNames": ["Q1", "Q2", "Q3"]}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelMergeFiles" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""files"": [""<base64-xlsx-1>"", ""<base64-xlsx-2>""]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelMergeFiles", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelMergeFiles"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelMergeFiles
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "files": [
│ "\u003Cbase64-xlsx-1\u003E",
│ "\u003Cbase64-xlsx-2\u003E"
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelMergeFiles"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Merge Rows
/api/ExcelMergeRows
1 token
Merge rows from multiple Excel files into one.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files |
array | required | Array of base64-encoded Excel files |
worksheet |
string | optional | Sheet name to merge from each file |
hasHeaders |
boolean | optional |
First row is headers
(default: true)
|
Request Example
{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"], "hasHeaders": true}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetName": "Merged", "headers": ["Name", "Email"], "totalDataRows": 120, "filesProcessed": 3}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelMergeRows" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"], "hasHeaders": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""files"": [""<base64-xlsx-1>"", ""<base64-xlsx-2>""], ""hasHeaders"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelMergeRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelMergeRows"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"], "hasHeaders": true}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelMergeRows
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "files": [
│ "\u003Cbase64-xlsx-1\u003E",
│ "\u003Cbase64-xlsx-2\u003E"
│ ],
│ "hasHeaders": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelMergeRows"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Split Worksheets
/api/ExcelSplitWorksheets
1 token
Split each worksheet into separate files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
Request Example
{"file": "<base64-xlsx>"}
Response Example
{"worksheets": [{"name": "Sheet1", "file": "<base64>"}]}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelSplitWorksheets" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelSplitWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelSplitWorksheets"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelSplitWorksheets
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelSplitWorksheets"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Delete Worksheets
/api/ExcelDeleteWorksheets
1 token
Delete specific worksheets.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheets |
array | required | Sheet names or indices |
Request Example
{"file": "<base64-xlsx>", "worksheets": ["Sheet2"]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "deletedWorksheets": ["Draft"], "deletedCount": 1, "remainingWorksheets": ["Sheet1", "Summary"]}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelDeleteWorksheets" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "worksheets": ["Sheet2"]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""worksheets"": [""Sheet2""]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelDeleteWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelDeleteWorksheets"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "worksheets": ["Sheet2"]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelDeleteWorksheets
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "worksheets": [
│ "Sheet2"
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelDeleteWorksheets"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Extract Worksheets
/api/ExcelExtractWorksheets
1 token
Extract specific worksheets as separate files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
worksheets |
array | required | Sheet names or indices |
Request Example
{"file": "<base64-xlsx>", "worksheets": ["Sheet1"]}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "extractedWorksheets": ["Summary"], "count": 1}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelExtractWorksheets" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "worksheets": ["Sheet1"]}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""worksheets"": [""Sheet1""]}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelExtractWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelExtractWorksheets"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "worksheets": ["Sheet1"]}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelExtractWorksheets
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "worksheets": [
│ "Sheet1"
│ ]
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelExtractWorksheets"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Secure
/api/ExcelSecure
1 token
Encrypt a workbook with a password (ECMA-376 agile, AES-256). The password is required to open the file and is not recoverable.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file (.xlsx, unencrypted) |
password |
string | required | Open password, max 255 characters |
Request Example
{"file": "<base64-xlsx>", "password": "secret"}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "encrypted": true, "encryption": {"standard": "ECMA-376 agile", "cipherAlgorithm": "AES-256-CBC", "hashAlgorithm": "SHA-512", "spinCount": 100000}, "originalBytes": 18432, "encryptedBytes": 24576, "note": "The workbook is encrypted at file level. The password is required to open it in Excel and is NOT recoverable - store it before discarding it."}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelSecure" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "password": "secret"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""password"": ""secret""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelSecure", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelSecure"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "password": "secret"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelSecure
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "password": "secret"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelSecure"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Unlock
/api/ExcelUnlock
1 token
Decrypt a password-protected workbook (ECMA-376 agile, ExcelSecure's counterpart) and remove worksheet protection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file (.xlsx, encrypted or unencrypted) |
password |
string | optional | Open password, required when the workbook is encrypted |
Request Example
{"file": "<base64-xlsx>", "password": "secret"}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "fileEncryptionRemoved": true, "unprotectedWorksheets": ["Sheet1"], "count": 1}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelUnlock" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "password": "secret"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""password"": ""secret""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelUnlock", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelUnlock"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "password": "secret"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelUnlock
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "password": "secret"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelUnlock"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededParse CSV
/api/ParseCsv
1 token
Parse CSV into structured JSON.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
csv |
string | required | CSV string or base64 |
options.delimiter |
string | optional | Delimiter character |
options.hasHeaders |
boolean | optional |
First row has headers
(default: true)
|
Request Example
{"csv": "name,email\nJohn,john@test.com", "options": {"hasHeaders": true}}
Response Example
{"rows": [{"name": "John", "email": "john@test.com"}], "rowCount": 1}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ParseCsv" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"csv": "name,email\nJohn,john@test.com", "options": {"hasHeaders": true}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""csv"": ""name,email\nJohn,john@test.com"", ""options"": {""hasHeaders"": true}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ParseCsv", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ParseCsv"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"csv": "name,email\nJohn,john@test.com", "options": {"hasHeaders": true}}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ParseCsv
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "csv": "name,email\nJohn,john@test.com",
│ "options": {
│ "hasHeaders": true
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ParseCsv"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededJSON to Excel
/api/JsonToExcel
1 token
Convert JSON data to an Excel file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
data |
array | required | Array of objects |
worksheetName |
string | optional |
Worksheet name
(default: Sheet1)
|
headers |
array | optional | Column order and header row; taken from the keys of the first object when omitted |
Request Example
{"data": [{"name": "John", "email": "john@test.com"}], "worksheetName": "Users"}
Response Example
{"success": true, "file": "<base64-xlsx>", "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "worksheetName": "Sheet1", "rowCount": 2, "columnCount": 2, "headers": ["name", "email"]}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/JsonToExcel" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"data": [{"name": "John", "email": "john@test.com"}], "worksheetName": "Users"}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""data"": [{""name"": ""John"", ""email"": ""john@test.com""}], ""worksheetName"": ""Users""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/JsonToExcel", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/JsonToExcel"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"data": [{"name": "John", "email": "john@test.com"}], "worksheetName": "Users"}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/JsonToExcel
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "data": [
│ {
│ "name": "John",
│ "email": "john@test.com"
│ }
│ ],
│ "worksheetName": "Users"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/JsonToExcel"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Populate Template
/api/ExcelPopulateTemplate
1 token
Find {placeholder} cells in an Excel template and replace with JSON values.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded XLSX file |
data |
object | required | Key-value pairs mapping placeholders to values |
worksheet |
string | optional | Specific sheet name |
Request Example
{"file": "<base64-xlsx>", "data": {"name": "John Doe", "total": "1500.00"}}
Response Example
{"file": "UEsDBBQAAAA..."}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelPopulateTemplate" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "data": {"name": "John Doe", "total": "1500.00"}}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""data"": {""name"": ""John Doe"", ""total"": ""1500.00""}}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelPopulateTemplate", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelPopulateTemplate"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "data": {"name": "John Doe", "total": "1500.00"}}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelPopulateTemplate
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "data": {
│ "name": "John Doe",
│ "total": "1500.00"
│ }
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelPopulateTemplate"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as neededExcel Add Watermark
/api/ExcelAddWatermark
1 token
Add a diagonal text watermark as a background image to Excel worksheets.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64-encoded XLSX file |
text |
string | required | Watermark text |
fontSize |
number | optional |
Font size
(default: 48)
|
opacity |
number | optional |
Opacity 0-1
(default: 0.3)
|
color |
string | optional |
Hex color
(default: #CCCCCC)
|
Request Example
{"file": "<base64-xlsx>", "text": "DRAFT", "fontSize": 48, "opacity": 0.3}
Response Example
{"file": "UEsDBBQAAAA..."}
Code Examples
curl -X POST "https://api.docbutterfly.com/api/ExcelAddWatermark" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "text": "DRAFT", "fontSize": 48, "opacity": 0.3}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""text"": ""DRAFT"", ""fontSize"": 48, ""opacity"": 0.3}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.docbutterfly.com/api/ExcelAddWatermark", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://api.docbutterfly.com/api/ExcelAddWatermark"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "text": "DRAFT", "fontSize": 48, "opacity": 0.3}')
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2))┌─────────────────────────────────────────────┐
│ Power Automate - HTTP Action │
├─────────────────────────────────────────────┤
│ │
│ Method: POST │
│ URI: https://api.docbutterfly.com/api/ExcelAddWatermark
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "text": "DRAFT",
│ "fontSize": 48,
│ "opacity": 0.3
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://api.docbutterfly.com/api/ExcelAddWatermark"
4. Add the headers shown above
5. Paste the Body JSON into the Body field
6. Replace placeholder values with dynamic content as needed