Excel to CSV This REST API indicates to convert
a spreadsheet file to a csv format file.
Query Parameter
Parameter Name
Type
Description
password
string
The password needed to open an Excel file.
storageName
string
The storage name where the file is situated.
checkExcelRestriction
bool
Whether check restriction of excel file when user modify cells related objects.
Request Body Parameter
Parameter Name
Type
Description
datafile
data file
The data file save into the first part of the multipart content.
Response
FileInfo
REST API Specification
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
You can use cURL command-line tool to access Aspose.Cells web services easily. The following example shows how to make calls to Cloud API with cURL.
Cloud SDK Family
Using an SDK is the best way to speed up the development. An SDK takes care of low-level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs:
C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Aspose.Cells.Cloud.SDK.Api.ExampleQuickstart
{
using System;
using System.IO;
using System.Collections.Generic;
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Model;
using Aspose.Cells.Cloud.SDK.Request;
public class CellsApiExample
{
string CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
string CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
CellsApi cellsApi = new CellsApi(CellsCloudClientId, CellsCloudClientSecret);
string localName = "Book1.xlsx";
string localPath = @"D:\TestData\CellsCloud";
string outputFilePath = @"D:\Outpath\result.pdf";
public void ExamplePostConvertWorkbookToPdf()
{
string inputPath = Path.Combine(localPath, localName);
using (var inputFile = File.OpenRead(inputPath))
{
var mapFiles = new Dictionary<string, Stream> { [localName] = inputFile };
var request = new PostConvertWorkbookToPDFRequest { File = mapFiles };
var response = cellsApi.PostConvertWorkbookToPDF(request);
byte[] fileBytes = Convert.FromBase64String(response.FileContent);
File.WriteAllBytes(outputFilePath, fileBytes);
}
}
}
}
Java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.client.*;
import com.aspose.cloud.cells.model.*;
import com.aspose.cloud.cells.request.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.File;
import java.util.HashMap;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ExapmlePostConvertWorkbookToPDF {
private CellsApi api;
public ExapmleQuickstart(){
try {
String CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
String CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
api = new CellsApi(CellsCloudClientId, CellsCloudClientSecret);
} catch (ApiException e) {
e.printStackTrace();
}
}
public void PostConvertWorkbookToPDF(){
try{
String localName = "Book1.xlsx";
String localPath = "D:/TestData/CellsCloud";
String outputFilePath ="D:/Outpath/result.pdf";
PostConvertWorkbookToPdfRequest request = new PostConvertWorkbookToPdfRequest();
File inputFile = new File(localPath, localName);
Map<String, File> fileMap = new HashMap<>();
fileMap.put(localName, inputFile);
request.setfile(fileMap);
FileInfo resultFile = this.api.postConvertWorkbookToPdf(request);
yte[] pdfBytes = Base64.getDecoder().decode(resultFile.getFileContent());
Files.write(Paths.get(outputPath), pdfBytes);
} catch (ApiException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
}
}
PHP
Ruby
Node.js
Python
Perl
Go
Other APIs implement this function
POST /cells/{name}/saveAs API lets you save MS Excel file as CSV file with additional settings and save the result to the storage.
This REST API convert
excel file to CSV.
PUT /cells/convert API lets you convert MS Excel file to CSV file with additional settings and save the result to the response.
This REST API export
excel file to CSV.
GET /cells/{name} API lets you convert MS Excel file to CSV file with additional settings and save the result to the response.