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 |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "rows": [["Name", "Email"], ["John", "john@test.com"]], "returnBase64": true}
Code Examples
curl -X POST "https://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"]], "returnBase64": true}'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""]], ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelAddRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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"]], "returnBase64": 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://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"
│ ]
│ ],
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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) |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "rows": [2, 3, 4], "returnBase64": true}
Code Examples
curl -X POST "https://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], "returnBase64": true}'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], ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelDeleteRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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], "returnBase64": 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://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
│ ],
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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)
|
range |
string | optional | Cell range: A1:D10 |
Request Example
{"file": "<base64-xlsx>", "hasHeaders": true}
Response Example
{"rows": [{"Name": "John", "Email": "john@test.com"}], "rowCount": 1}
Code Examples
curl -X POST "https://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://docbutterfly.com/api/ExcelExtractRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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} |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "updates": [{"row": 1, "col": 1, "value": "Updated"}], "returnBase64": true}
Code Examples
curl -X POST "https://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"}], "returnBase64": true}'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""}], ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelUpdateRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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"}], "returnBase64": 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://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"
│ }
│ ],
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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 |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "find": "old", "replace": "new", "returnBase64": true}
Code Examples
curl -X POST "https://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", "returnBase64": true}'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"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelFindReplace", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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", "returnBase64": 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://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",
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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 |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"], "returnBase64": true}
Code Examples
curl -X POST "https://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>"], "returnBase64": 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>""], ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelMergeFiles", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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>"], "returnBase64": 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://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"
│ ],
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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)
|
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"files": ["<base64-xlsx-1>", "<base64-xlsx-2>"], "hasHeaders": true, "returnBase64": true}
Code Examples
curl -X POST "https://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, "returnBase64": 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, ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelMergeRows", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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, "returnBase64": 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://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,
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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://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://docbutterfly.com/api/ExcelSplitWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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 |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "worksheets": ["Sheet2"], "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExcelDeleteWorksheets" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "worksheets": ["Sheet2"], "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""worksheets"": [""Sheet2""], ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelDeleteWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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"], "returnBase64": 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://docbutterfly.com/api/ExcelDeleteWorksheets
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "worksheets": [
│ "Sheet2"
│ ],
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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"]}
Code Examples
curl -X POST "https://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://docbutterfly.com/api/ExcelExtractWorksheets", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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
Add password protection to worksheets.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
password |
string | required | Protection password |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "password": "secret", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExcelSecure" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "password": "secret", "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""password"": ""secret"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelSecure", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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", "returnBase64": 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://docbutterfly.com/api/ExcelSecure
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "password": "secret",
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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
Remove worksheet protection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file |
string | required | Base64 Excel file |
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"file": "<base64-xlsx>", "returnBase64": true}
Code Examples
curl -X POST "https://docbutterfly.com/api/ExcelUnlock" \
-H "X-API-Key: df_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"file": "<base64-xlsx>", "returnBase64": true}'using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "df_your_api_key_here");
var json = @"{""file"": ""<base64-xlsx>"", ""returnBase64"": true}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/ExcelUnlock", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://docbutterfly.com/api/ExcelUnlock"
headers = {
"X-API-Key": "df_your_api_key_here",
"Content-Type": "application/json"
}
payload = json.loads('{"file": "<base64-xlsx>", "returnBase64": 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://docbutterfly.com/api/ExcelUnlock
│ │
│ Headers: │
│ X-API-Key: df_your_api_key_here │
│ Content-Type: application/json │
│ │
│ Body: │
│ {
│ "file": "\u003Cbase64-xlsx\u003E",
│ "returnBase64": true
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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://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://docbutterfly.com/api/ParseCsv", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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 |
sheetName |
string | optional |
Worksheet name
(default: Sheet1)
|
returnBase64 |
boolean | optional |
Return base64
(default: true)
|
Request Example
{"data": [{"name": "John", "email": "john@test.com"}], "sheetName": "Users"}
Code Examples
curl -X POST "https://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"}], "sheetName": "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""}], ""sheetName"": ""Users""}";
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://docbutterfly.com/api/JsonToExcel", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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"}], "sheetName": "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://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"
│ }
│ ],
│ "sheetName": "Users"
│ }
│ │
└─────────────────────────────────────────────┘
Steps:
1. Add an HTTP action to your flow
2. Set Method to "POST"
3. Set URI to "https://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://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://docbutterfly.com/api/ExcelPopulateTemplate", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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://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://docbutterfly.com/api/ExcelAddWatermark", content);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);import requests
import json
url = "https://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://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://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