apyhub-logo
50 atoms
Base tier

About

This Utility API lets you upload and convert a comma-separated values (CSV) file to an Excel spreadsheet.
With this API, you can transform any CSV spreadsheet to an Excel spreadsheet with minimal loss to the formatting and data in the spreadsheet.
It is often easier to produce csv files from the backend services, however for end users, it is often much more user friendly to view these files in Excel. And in such cases, instead of constructing the excel files within your applications, you can generate excel files on demand using this service.
Endpoint Selector
Input
Output

API Playground

Documentation

upload file: download file
POST
https://api.apyhub.com/convert/csv-file/excel-file

Request example

1
curl --location --request POST 'https://api.apyhub.com/convert/csv-file/excel-file?output=test-sample' \
2
--header 'apy-token: {{token}}' \
3
--form 'file=@"test.csv"'
The method lets you pass a csv file and returns the converted Excel file as a parameter. This is the most straight forward way to use this service - submit a csv file and receive the generated Excel file as a response.
Method: POST
Content Type: multipart/form-data
Query Parameter(s)
AttributeTypeMandatoryDescription
outputStringNoThe Excel file name for the converted document. If no output attribute is provided, the default file name will be output.xlsx
Request Body
AttributeTypeMandatoryDescription
fileFileYesThe source csv file.

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
400Request is invalid or the file is not accessible.
401Required authentication information is either missing or not valid for the resource.
500There was an error in processing this request.

Authentication

All requests to ApyHub services need to be authenticated, currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from workspace settings (on the left side of the navbar) and go to applications.
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.