Skip to main content

Add Text Header/Footer to Excel using n8n action

PDF4me Add Text Header Footer to Excel enables adding customizable text headers and footers to Excel documents through n8n automation workflows. Process Excel files via n8n triggers, binary data, base64 strings, or public URLs to add document titles, page numbers, dates, branding, and custom text with full control over font styling (family, size, color, name), transparency levels, rotation angles, and orientation options (horizontal, vertical, diagonal, upside-down). This solution is ideal for document branding, professional presentation, corporate identity, and automated formatting workflows that require text headers and footers with comprehensive styling control and seamless integration.

Setup

Add the PDF4me "Add Text Header Footer" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Add Text Header/Footer" action
  3. Configure input parameters (see below)
Add Text Header Footer to Excel

Parameters

Complete list of parameters for the Add Text Header Footer action. Configure these parameters to control text formatting.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringExcel Input Format Selection
• Choose the format of your Excel data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary Field***BinaryBinary Excel File Input (Required if Binary Data)
• Reference Excel file (.xlsx, .xls) from previous n8n node or file upload
• PDF4me processes binary Excel files with automatic format detection
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Excel Content***StringBase64 Encoded Excel Input (Required if Base64 String)
• Provide Excel content (.xlsx, .xls) as base64 encoded string
• PDF4me automatically decodes and processes the Excel content
• Required when Input Data Type is "Base64 String"
UEsDBBQABgAI...
Excel URL***StringPublic Excel URL Input (Required if URL)
• Provide a public/open permission URL to the Excel file (.xlsx, .xls)
• PDF4me downloads and processes the Excel file from the provided URL
• Required when Input Data Type is "URL"
https://abc.com/data.xlsx
Excel Name***StringExcel Input Filename
• Specify the name of the input Excel file with proper extension (.xlsx, .xls)
• PDF4me uses this for format detection and processing optimization
data.xlsx
Watermark Text***StringHeader/Footer Text Content
• Text to be displayed as header or footer
• Can include document title, dates, page numbers
• Supports dynamic content from n8n expressions
• Any alphanumeric characters and symbols
Confidential Report 2024
Font FamilyStringFont Family Name
• Font family to use for text
• Common families: Arial, Times New Roman, Calibri
• Default: Arial if not specified
• Used unless FontName overrides it
Arial
Font SizeNumberText Size in Points
• Font size of header/footer text
• Standard range 8-72 points
• Default: 72 if not specified
• Larger values for better visibility
12
Font ColorStringText Color
• Hex color code (e.g., "#FF0000") or color name
• Supports standard HTML color names
• Determines text appearance
• Default: black if not specified
#0000FF
Semi TransparentBooleanTransparency Level
True - Apply 50% opacity (semi-transparent)
False - Apply 100% opacity (fully opaque)
• Default: false (fully opaque)
• Useful for watermark-style headers
false
RotationNumberRotation Angle in Degrees
• Rotation angle for text (0-360 degrees)
• Default: 0 (no rotation)
• Clockwise rotation
• Note: Orientation parameter takes priority if provided
45
Font NameStringSpecific Font Name
• Specific font name to use
• Overrides FontFamily if provided
• Use for precise font control
• Example: "Arial Bold", "Calibri Light"
Arial Bold
OrientationStringText Orientation
Horizontal - Standard left-to-right text
Vertical - Top-to-bottom vertical text
Diagonal - Diagonal text across page
Upside-Down - 180-degree rotated text
• Takes priority over Rotation parameter
Horizontal
Culture NameStringCulture Code
• Culture/locale code for text rendering
• Examples: "en-US", "de-DE", "fr-FR"
• Ensures proper character rendering
• Affects date/number formatting if applicable
en-US
Binary Data Output Name***StringBinary Data Output Mapping
• Define the variable name for accessing generated Excel binary data
• Used in subsequent workflow actions
• Essential for workflow automation
document

Note: The Orientation parameter takes priority over the Rotation parameter. If Orientation is specified, the Rotation value will be ignored.

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringExcel document filename with header/footer - The name of the output Excel document file after header/footer additionexcel_with_header_footer.xlsx
fileSizeNumberFile size in bytes - The size of the Excel document in bytes after header/footer addition212749
successBooleanPDF4me operation status - Boolean flag indicating the success or failure of the header/footer insertion process. PDF4me returns true for successful operations and false for any errorstrue
originalFileNameStringOriginal Excel document filename - The name of the input Excel document filemyExcelFile.xlsx
headerLeftStringLeft header content - Text content displayed in the left section of the headerabc
headerCenterStringCenter header content - Text content displayed in the center section of the header``
headerRightStringRight header content - Text content displayed in the right section of the header``
footerLeftStringLeft footer content - Text content displayed in the left section of the footer``
footerCenterStringCenter footer content - Text content displayed in the center section of the footer``
footerRightStringRight footer content - Text content displayed in the right section of the footer``
worksheetNameStringWorksheet name - The name of the worksheet where header/footer was appliedSheet1
headerTextStringHeader text - General header text content (if used)``
footerTextStringFooter text - General footer text content (if used)``
headerAlignmentStringHeader alignment - Alignment of header text. Values: "left", "center", "right"center
footerAlignmentStringFooter alignment - Alignment of footer text. Values: "left", "center", "right"center
fontSizeNumberFont size in points - Font size used for header/footer text10
fontColorStringFont color - Color of the header/footer text in hex format#000000
applyToAllWorksheetsBooleanApply to all worksheets - Indicates whether header/footer was applied to all worksheets. true if applied to all, false if applied to specific worksheet onlyfalse
messageStringOperation message - Descriptive message indicating the result of the header/footer addition operationHeader and footer added to Excel file successfully

N8N Action Response

The PDF4me Add Text Header/Footer API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"fileName": "excel_with_header_footer.xlsx",
"fileSize": 212749,
"success": true,
"originalFileName": "myExcelFile.xlsx",
"headerLeft": "abc",
"headerCenter": "",
"headerRight": "",
"footerLeft": "",
"footerCenter": "",
"footerRight": "",
"worksheetName": "Sheet1",
"headerText": "",
"footerText": "",
"headerAlignment": "center",
"footerAlignment": "center",
"fontSize": 10,
"fontColor": "#000000",
"applyToAllWorksheets": false,
"message": "Header and footer added to Excel file successfully"
}
]

Use Cases

Document Branding and Professional Presentation

  • Add company names, logos (as text), and branding elements to Excel reports
  • Insert document titles, report names, and project identifiers in headers
  • Apply corporate identity standards with consistent font and color styling

Automated Report Generation

  • Add page numbers, dates, and generation timestamps to Excel reports
  • Insert report metadata and version information in headers and footers
  • Apply confidentiality notices and security labels to sensitive documents

Multi-Language and Localization

  • Add headers and footers with proper character rendering for international documents
  • Apply culture-specific formatting for dates and numbers in header/footer text
  • Support multiple languages with appropriate font and character encoding

Get Help