Parse CSV - Excel API
PDF4me Parse CSV enables you to parse CSV content into Excel workbooks with encoding and delimiter options. This API service accepts CSV data (as string or Base64) and produces an Excel document. The API receives CSV content through REST API calls, utilizing Base64 encoding for secure transmission where applicable. This solution is ideal for data import, ETL workflows, and CSV-to-Excel conversion.
Authenticating Your API Request
Include your API key in the request to authenticate with the PDF4me REST API.
Key Features
- CSV to Excel: Convert CSV data into Excel workbook format
- Encoding and Delimiter: Support for different encodings and field delimiters
REST API Endpoint
- Method: POST
- Endpoint:
office/ApiV2Excel/ExcelParseCsv
REST API Parameters
Important: Parameters marked with an asterisk (*) are required. All requests use document, docContent, and csvParseToExcelAction. CSV content, output file name, delimiter, encoding, etc. are properties of the action object.
Required Parameters (root level)
| Parameter | Type | Description | Example |
|---|---|---|---|
| document* | Object | Document reference with Name (e.g. output file name or placeholder). For CSV parse, docContent may contain CSV data as Base64 | { "Name": "output.xlsx" } |
| docContent* | String (Base64) | CSV content encoded in Base64 (or as required by the API) | Base64-encoded CSV string |
| csvParseToExcelAction* | Object | Action configuration. Must contain csvContent and/or outputFileName; delimiter, encoding, cultureName optional | See Payload example below |
Optional Parameters (inside csvParseToExcelAction)
| Parameter | Type | Description | Example |
|---|---|---|---|
| delimiter | String | Field delimiter (e.g., ",", ";", "\t"). Default: "," | , |
| encoding | String | Character encoding (e.g., "UTF-8", "ISO-8859-1") | UTF-8 |
| cultureName | String | Culture code for number/date parsing | en-US |
Output
The API returns the generated Excel document as a Base64-encoded string in JSON format (document, fileName, success, errorMessage).
Request Example
Header
Content-Type: application/json
Authorization: Basic YOUR_BASE64_ENCODED_API_KEY
Payload (Basic)
{
"document": { "Name": "output.xlsx" },
"docContent": "TmFtZSxBZ2UKSm9obiwzMApKYW5lLDI4",
"csvParseToExcelAction": {
"outputFileName": "output.xlsx",
"delimiter": ",",
"encoding": "UTF-8"
}
}