Skip to main content

Update Rows - Excel API

PDF4me Update Rows enables you to update existing rows in Excel documents with table-based or coordinate-based targeting. This API service processes Excel files and modifies cell data using JSON input. The API receives Excel document content and update data through REST API calls, utilizing Base64 encoding for secure transmission. This solution is ideal for data synchronization, report updates, and automated Excel editing workflows.

Authenticating Your API Request

Include your API key in the request to authenticate with the PDF4me REST API.

Key Features

  • Row Updates: Modify existing rows with JSON data
  • Table or Coordinate Mode: Target by table name or by row/column coordinates
  • Type Conversion: Optional automatic conversion of numbers and dates
  • Culture Support: Culture-specific date and number parsing

REST API Endpoint

  • Method: POST
  • Endpoint: office/ApiV2Excel/ExcelUpdateRows

REST API Parameters

Important: Parameters marked with an asterisk (*) are required. All requests use document, docContent, and updateRowsToExcelAction. Operation-specific parameters (jsonInput, worksheetName, etc.) are properties of the action object.

Required Parameters (root level)

ParameterTypeDescriptionExample
document*ObjectDocument reference with Name (Excel file name){ "Name": "data.xlsx" }
docContent*String (Base64)Excel document content encoded in Base64UEsDBBQABgAIAAAA...
updateRowsToExcelAction*ObjectAction configuration. Must contain jsonInput (string) — JSON data for updatesSee Payload example below

Optional Parameters (inside updateRowsToExcelAction)

ParameterTypeDescriptionExample
worksheetNameStringTarget worksheet nameSheet1
tableNameStringExcel table name for table-based mode; empty = coordinate-basedSalesTable
excelRowNumberNumber (int)1-based row position (table mode)5
insertFromRowNumber (int)1-based start row (coordinate mode)10
insertFromColumnNumber (int)1-based start column (coordinate mode)1
convertNumericAndDateBooleanAutomatic type conversion. Default: truetrue
cultureNameStringCulture for date/number parsingen-US

Output

The API returns the Excel document as a Base64-encoded string in JSON format (document, fileName, success, errorMessage).

Request Example

Content-Type: application/json
Authorization: Basic YOUR_BASE64_ENCODED_API_KEY

Payload (Basic)

{
"document": { "Name": "data.xlsx" },
"docContent": "UEsDBBQABgAIAAAA...",
"updateRowsToExcelAction": {
"jsonInput": "[{\"Name\":\"John\",\"Age\":31}]"
}
}

Code Samples

Get Help