Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aspose-cells/5e354c1674e561aeb369d1d0f697ddbc to your computer and use it in GitHub Desktop.
Save aspose-cells/5e354c1674e561aeb369d1d0f697ddbc to your computer and use it in GitHub Desktop.
Aspose_Cells_Cloud_Android
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String cellName = "A2";
com.aspose.cells.model.Style body = new com.aspose.cells.model.Style();
com.aspose.cells.model.Font font = new com.aspose.cells.model.Font();
font.setName("Calibri");
font.setSize(40);
body.setFont(font);
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
cellsApi.PostUpdateWorksheetCellStyle("sample1.xlsx", sheetName, cellName, Utils.STORAGE, Utils.FOLDER,
body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload("sample1.xlsx", null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String output = "sample2.xlsx";
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String range = "A1:A10";
Integer startRow = 1;
Integer startColumn = 1;
Integer endRow = 2;
Integer endColumn = 2;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostClearContents(input, sheetName, range, startRow, startColumn, endRow, endColumn,
Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr =storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String range = "A1:A12";
Integer startRow = null;
Integer startColumn = null;
Integer endRow = null;
Integer endColumn = null;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostClearFormats(input, sheetName, range, startRow, startColumn, endRow, endColumn, Utils.STORAGE,
Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String cellName = "a1";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.StyleResponse apiResponse = cellsApi.GetWorksheetCellStyle(input, sheetName,
cellName, Utils.STORAGE, Utils.FOLDER);
Log.d("aspose-example","Cell Style Font :: " + apiResponse.getStyle().getFont().getName());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
Instantiate Aspose Storage API SDK
orageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
Instantiate Aspose Words API SDK
llsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "a1";
storageApi.PutCreate(
input,
null,
Utils.STORAGE,
inputFile
);
com.aspose.cells.model.CellResponse apiResponse
= cellsApi.GetWorksheetCell(
input,
sheetName,
cellOrMethodName,
Utils.STORAGE,
Utils.FOLDER
);
com.aspose.cells.model.Cell cell = apiResponse.getCell();
System.out.println("Cell Name :: " + cell.getName());
System.out.println("Cell Value :: " + cell.getValue());
}
ch (Exception e) {
printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "endcell";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.CellResponse apiResponse = cellsApi.GetWorksheetCell(input, sheetName,
cellOrMethodName, Utils.STORAGE, Utils.FOLDER);
com.aspose.cells.model.Cell cell = apiResponse.getCell();
System.out.println("Cell Name :: " + cell.getName());
System.out.println("Cell Value :: " + cell.getValue());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "firstcell";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.CellResponse apiResponse = cellsApi.GetWorksheetCell(input, sheetName,
cellOrMethodName, Utils.STORAGE, Utils.FOLDER);
com.aspose.cells.model.Cell cell = apiResponse.getCell();
System.out.println("Cell Name :: " + cell.getName());
System.out.println("Cell Value :: " + cell.getValue());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "maxcolumn";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MaxColumn :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "maxdatacolumn";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MaxDataColumn :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "maxdatarow";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MaxDataRow :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "maxrow";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MaxRow :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
Integer mergedCellIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.MergedCellResponse apiResponse = cellsApi.GetWorkSheetMergedCell(input, sheetName,
mergedCellIndex, Utils.STORAGE, Utils.FOLDER);
System.out.println("Merge Start Column :: " + apiResponse.getMergedCell().getStartColumn());
System.out.println("Merge End Column :: " + apiResponse.getMergedCell().getEndColumn());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "mincolumn";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MinColumn :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
String cellOrMethodName = "mindatacolumn";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MinDataColumn :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1)); String output = "sample2.xlsx";
String sheetName = "Sheet1";
String cellOrMethodName = "mindatarow";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MaxDataRow :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1)); String output = "sample2.xlsx";
String sheetName = "Sheet1";
String cellOrMethodName = "minrow";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
Integer apiResponse = cellsApi.GetWorksheetCellProperty(input, sheetName, cellOrMethodName, Utils.STORAGE,
Utils.FOLDER);
System.out.println(" MinRow :: " + apiResponse);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1)); String output = "sample2.xlsx";
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer startRow = 1;
Integer startColumn = 0;
Integer totalRows = 1;
Integer totalColumns = 5;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostWorksheetMerge(input, sheetName, startRow, startColumn, totalRows, totalColumns, Utils.STORAGE,
Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String output = "sample2.xlsx";
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String cellName = "a1";
String value = "99";
String type = "int";
String formula = "";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostWorksheetCellSetValue(input, sheetName, cellName, value, type, formula, Utils.STORAGE,
Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
Path inputFile = Utils.getPath(SetFormulaForCellWorksheet.class, input);
String output = "sample2.xlsx";
Path outputFile = Utils.getPath(SetFormulaForCellWorksheet.class, output);
String sheetName = "Sheet1";
String cellName = "A12";
String value = "";
String type = "int";
String formula = "sum(a5:a10)";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile.toFile());
cellsApi.PostWorksheetCellSetValue(input, sheetName, cellName, value, type, formula, Utils.STORAGE,
Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Files.copy(sr.getInputStream(), outputFile, StandardCopyOption.REPLACE_EXISTING);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String output = "sample2.xlsx";
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String cellarea = "A10:B20";
String value = "1234";
String type = "int";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostSetCellRangeValue(input, sheetName, cellarea, value, type, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
Path inputFile = Utils.getPath(UnmergeCellsWorksheet.class, input);
String output = "sample2.xlsx";
Path outputFile = Utils.getPath(UnmergeCellsWorksheet.class, output);
String sheetName = "Sheet1";
Integer startRow = 1;
Integer startColumn = 0;
Integer totalRows = 1;
Integer totalColumns = 5;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile.toFile());
cellsApi.PostWorksheetUnmerge(input, sheetName, startRow, startColumn, totalRows, totalColumns,
Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Files.copy(sr.getInputStream(), outputFile, StandardCopyOption.REPLACE_EXISTING);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
String chartType = "bar";
Integer upperLeftRow = 12;
Integer upperLeftColumn = 12;
Integer lowerRightRow = 20;
Integer lowerRightColumn = 20;
String area = "A1:A3";
Boolean isVertical = false;
String categoryData = "";
Boolean isAutoGetSerialName = true;
String title = "SalesState";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ChartsResponse apiResposne = cellsApi.PutWorksheetAddChart(input, sheet, chartType,
upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn, area, isVertical, categoryData,
isAutoGetSerialName, title, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample","xlsx", context.getResources().openRawResource(R.raw.Sample));
File outputFile = Utils.stream2file("Chart","png", context.getResources().openRawResource(R.raw.Chart));
storageApi.PutCreate("sample.xlsx", null, Utils.STORAGE, inputFile);
ResponseMessage cr = cellsApi.GetWorksheetChartWithFormat("sample.xlsx", "Sheet1", 0,
"png", Utils.STORAGE, Utils.FOLDER);
Utils.copyInputStreamToFile(cr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample","xlsx", context.getResources().openRawResource(R.raw.Sample));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetClearCharts(input, sheet, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample","xlsx", context.getResources().openRawResource(R.raw.Sample));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetChartTitle(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample","xlsx", context.getResources().openRawResource(R.raw.Sample));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetDeleteChart(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int chart = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ChartResponse r = cellsApi.GetWorksheetChart(input, sheet, chart, Utils.STORAGE,
Utils.FOLDER);
System.out.println("Name: " + r.getChart().getName());
System.out.println("Type: " + r.getChart().getType());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ChartAreaResponse apiResponse = cellsApi.GetChartArea(input, sheet, chartIndex,
Utils.STORAGE, Utils.FOLDER);
System.out.println("Area X: " + apiResponse.getChartArea().getX());
System.out.println("Area Y: " + apiResponse.getChartArea().getY());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.FillFormatResponse apiResponse = cellsApi.GetChartAreaFillFormat(input, sheet,
chartIndex, Utils.STORAGE, Utils.FOLDER);
System.out.println("ChatArea FillFormat Type :: " + apiResponse.getFillFormat().getType());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.LegendResponse apiResponse = cellsApi.GetWorksheetChartLegend(input,
sheet, chartIndex, Utils.STORAGE, Utils.FOLDER);
System.out.println("Chart Legend Position :: " + apiResponse.getLegend().getPosition());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetChartLegend(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
com.aspose.cells.model.Title body = new com.aspose.cells.model.Title();
body.setHeight(15);
body.setText("aspose");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutWorksheetChartTitle(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutWorksheetChartLegend(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
com.aspose.cells.model.Legend body = new com.aspose.cells.model.Legend();
body.setHeight(15);
body.setPosition("Left");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostWorksheetChartLegend(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
Integer chartIndex = 0;
com.aspose.cells.model.Title body = new com.aspose.cells.model.Title();
body.setHeight(15);
body.setText("asposeAlpha");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutWorksheetChartTitle(input, sheet, chartIndex, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
public static final String apiKey="a165298dc077f8852d5eb6e5bf49310d";
public static final String appSID="1c7a12ca-efa8-466e-b83d-234d9d5e2309";
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetDateFilter(fileName, sheetName, "range=A1:B1&fieldIndex=0&dateTimeGroupingType=Year&year=1920&refresh=true", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(AddFilterToFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetAutoFilter(fileName, sheetName, "range=A1:B1&fieldIndex=0&criteria=Year", null, null);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try {
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetIconFilter(fileName, sheetName,
"range=A1:B1&fieldIndex=0&iconSetType=ArrowsGray3&iconId=1", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok")) {
System.out.println("Get worksheet autofilter, Done!");
}
} catch (Exception ex) {
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.DeleteWorksheetAutoFilter(fileName, sheetName, "fieldIndex=0&criteria=Year", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.DeleteWorksheetDateFilter(fileName, sheetName, "fieldIndex=0&dateTimeGroupingType=Year&year=1920", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetCustomFilter(fileName, sheetName, "range=A1:B1&fieldIndex=0&operatorType1=LessOrEqual&criteria1=1", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetDynamicFilter(fileName, sheetName, "range=A1:B1&fieldIndex=0&dynamicFilterType=BelowAverage&matchBlanks=true", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try {
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PutWorksheetFilterTop10(fileName, sheetName,
"range=A1:B1&fieldIndex=0&isTop=true&itemCount=1&isPercent=true&matchBlanks=true", storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok")) {
System.out.println("Get worksheet autofilter, Done!");
}
} catch (Exception ex) {
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try
{
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(GetAutoFilterDescriptionExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
AutoFilterRespnse apiResponse = cellsApi.GetWorksheetAutoFilter(fileName, sheetName, storage, folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok"))
{
System.out.println("Get worksheet autofilter, Done!");
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try {
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PostWorksheetMatchBlanks(fileName, sheetName,0, storage,
folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok")) {
System.out.println("Get worksheet autofilter, Done!");
}
} catch (Exception ex) {
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try {
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PostWorksheetMatchNonBlanks(fileName, sheetName,0, storage,
folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok")) {
System.out.println("Get worksheet autofilter, Done!");
}
} catch (Exception ex) {
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
String fileName = "Book1.xlsx";
String sheetName = "Sheet1";
String storage = null;
String folder = null;
try {
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
// Upload source file to aspose cloud storage
Path inputFile = Utils.getPath(DeleteFilterForFilterColumnExample.class, "Sample.xlsx");
storageApi.PutCreate(fileName, "", "", inputFile.toFile());
// Invoke Aspose.Cells Cloud SDK API to get worksheet autofilter
SaaSposeResponse apiResponse = cellsApi.PostWorksheetAutoFilterRefresh(fileName, sheetName, storage,
folder);
if (apiResponse != null && apiResponse.getStatus().equals("Ok")) {
System.out.println("Get worksheet autofilter, Done!");
}
} catch (Exception ex) {
ex.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "ouput.png";
File inputFile = Utils.stream2file("sample4","xlsx", context.getResources().openRawResource(R.raw.sample4));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer autoshapeNumber = 0;
String format = "png";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ResponseMessage sr = cellsApi.GetWorksheetAutoshapeWithFormat(input, sheetName,
autoshapeNumber, format, Utils.STORAGE, Utils.FOLDER);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String sheetName = "Sheet1";
String output = "sample2.xlsx";
String sourceFileName = "ole.docx";
String imageFileName = "picture.png";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
File sourceFile = Utils.stream2file("ole","docx", context.getResources().openRawResource(R.raw.ole));
File imageFile = Utils.stream2file("picture","png", context.getResources().openRawResource(R.raw.picture));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
storageApi.PutCreate(sourceFileName, null, Utils.STORAGE, sourceFile);
storageApi.PutCreate(imageFileName, null, Utils.STORAGE, imageFile);
Integer upperLeftRow = null;
Integer upperLeftColumn = null;
Integer height = 200;
Integer width = 200;
String oleFile = sourceFileName;
com.aspose.cells.model.OleObject body = new com.aspose.cells.model.OleObject();
body.setSourceFullName(sourceFileName);
body.setImageSourceFullName(imageFileName);
body.setUpperLeftRow(15);
body.setUpperLeftColumn(5);
body.setTop(10);
body.setBottom(10);
body.setLeft(10);
body.setHeight(200);
body.setWidth(200);
body.setIsAutoSize(true);
cellsApi.PutWorksheetOleObject(input, sheetName, upperLeftRow, upperLeftColumn, height, width, oleFile,
imageFileName, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String sheetName = "Sheet1";
String output = "output.png";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("Chart","xlsx", context.getResources().openRawResource(R.raw.Chart));
Integer objectNumber = 0;
String format = "png";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ResponseMessage sr = cellsApi.GetWorksheetOleObjectWithFormat(input, sheetName,
objectNumber, format, Utils.STORAGE, Utils.FOLDER);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String sheetName = "Sheet1";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetOleObjects(input, sheetName, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String sheetName = "Sheet1";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetOleObject(input, sheetName,1, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
String sheetName = "Sheet1";
Integer objectNumber = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.OleObjectResponse apiResponse = cellsApi.GetWorksheetOleObject(input, sheetName,
objectNumber, Utils.STORAGE, Utils.FOLDER);
System.out.println(" Pivot Table: " + apiResponse.getOleObject().getFileFormatType());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
String sourceFileName = "ole.docx";
String imageFileName = "picture.png";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
File sourceFile = Utils.stream2file("ole","docx", context.getResources().openRawResource(R.raw.ole));
File imageFile = Utils.stream2file("picture","png", context.getResources().openRawResource(R.raw.picture));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
storageApi.PutCreate(sourceFileName, null, Utils.STORAGE, sourceFile);
storageApi.PutCreate(imageFileName, null, Utils.STORAGE, imageFile);
String sheetName = "Sheet1";
Integer oleObjectIndex = 0;
com.aspose.cells.model.OleObject body = new com.aspose.cells.model.OleObject();
body.setSourceFullName(sourceFileName);
body.setImageSourceFullName(imageFileName);
body.setUpperLeftRow(15);
body.setUpperLeftColumn(5);
body.setTop(10);
body.setBottom(10);
body.setLeft(10);
body.setHeight(200);
body.setWidth(200);
body.setIsAutoSize(true);
cellsApi.PostUpdateWorksheetOleObject(input, sheetName, oleObjectIndex, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
String picture = "picture.png";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
File pictureFile = Utils.stream2file("picture","png", context.getResources().openRawResource(R.raw.picture));
String sheetName = "Sheet1";
Integer upperLeftRow = 5;
Integer upperLeftColumn = 5;
Integer lowerRightRow = 10;
Integer lowerRightColumn = 10;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
storageApi.PutCreate(picture, null, Utils.STORAGE, pictureFile);
cellsApi.PutWorksheetAddPicture(input, sheetName, upperLeftRow, upperLeftColumn, lowerRightRow,
lowerRightColumn, picture, Utils.STORAGE, Utils.FOLDER, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "output.png";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer pictureNumber = 0;
String format = "png";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
ResponseMessage sr = cellsApi.GetWorksheetPictureWithFormat(input, sheetName, pictureNumber, format,
Utils.STORAGE, Utils.FOLDER);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
String sheetName = "Sheet1";
File inputFile = Utils.stream2file("sample6","xlsx", context.getResources().openRawResource(R.raw.sample6));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorkSheetPictures(input, sheetName, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); }
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample5.xlsx";
String output = "sample2.xlsx";
String sheetName = "Sheet1";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
Integer pictureIndex = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteWorksheetPicture(input, sheetName, pictureIndex, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample5.xlsx";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
Integer pictureNumber = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.PictureResponse apiResponse = cellsApi.GetWorksheetPicture(input, sheetName,
pictureNumber, Utils.STORAGE, Utils.FOLDER);
System.out.println(" Picture : " + apiResponse.getPicture().getImageFormat());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample5.xlsx";
File inputFile = Utils.stream2file("sample5","xlsx", context.getResources().openRawResource(R.raw.sample5));
String output = "sample2.xlsx";
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";Integer pictureIndex = 0;
com.aspose.cells.model.Picture body = new com.aspose.cells.model.Picture();
body.setName("Updated Picture Name");
body.setRotationAngle(90.0);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostWorkSheetPicture(input, sheetName, pictureIndex, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
String sheetName = "Sheet1";
String pivotFieldType = "Row";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
Integer pivotTableIndex = 0;
com.aspose.cells.model.PivotTableFieldRequest body = new com.aspose.cells.model.PivotTableFieldRequest();
body.getData().add(1);
body.getData().add(1);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutPivotTableField(input, sheetName, pivotTableIndex, pivotFieldType, Utils.STORAGE, Utils.FOLDER,
body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String sourceData = "";
String destCellName = "";
String tableName = "";
Boolean useSameSource = true;
com.aspose.cells.model.CreatePivotTableRequest body = new com.aspose.cells.model.CreatePivotTableRequest();
body.setName("MyPivot");
body.setSourceData("A1:B4");
body.setDestCellName("H20");
body.setUseSameSource(true);
body.getPivotFieldRows().add(1);
body.getPivotFieldColumns().add(1);
body.getPivotFieldRows().add(1);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutWorksheetPivotTable(input, sheetName, Utils.STORAGE, Utils.FOLDER, sourceData, destCellName,
tableName, useSameSource, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
storageApi.PutCreate(input, null, null, inputFile);
cellsApi.DeleteWorksheetPivotTables(input, sheetName, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
Integer pivotTableIndex = 0;
String sheetName = "Sheet1";
storageApi.PutCreate(input, null, null, inputFile);
cellsApi.DeleteWorksheetPivotTable(input, sheetName, pivotTableIndex, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
Integer pivottableIndex = 0;
storageApi.PutCreate(input, null, null, inputFile);
com.aspose.cells.model.PivotTableResponse apiResponse = cellsApi.GetWorksheetPivotTable(input, sheetName,
pivottableIndex, null, null);
com.aspose.cells.model.PivotTable pivotTable = apiResponse.getPivotTable();
System.out.println("Name" + pivotTable.getName());
for (com.aspose.cells.model.PivotItem item : pivotTable.getBaseFields().get(0).getPivotItems()) {
System.out.println("Pivot Item Name :: " + item.getName());
System.out.println("Pivot Item Value :: " + item.getValue());
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
String sheetName = "Sheet1";
storageApi.PutCreate(input, null, null, inputFile);
com.aspose.cells.model.PivotTablesResponse apiResponse = cellsApi.GetWorksheetPivotTables(input, sheetName,
null, null);
System.out.println(" Pivot Table " + apiResponse.getPivotTables().getClass().toString());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
com.aspose.cells.model.CellsDocumentPropertiesResponse apiResponse = cellsApi.GetDocumentProperties(input,
Utils.STORAGE, null);
for (com.aspose.cells.model.CellsDocumentProperty docProperty : apiResponse.getDocumentProperties()
.getDocumentPropertyList()) {
System.out.println("Name: " + docProperty.getName());
System.out.println("Value: " + docProperty.getValue());
System.out.println("BuiltIn: " + docProperty.getBuiltIn());
System.out.println("");
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String propertyName = "Author";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
com.aspose.cells.model.CellsDocumentPropertyResponse apiResponse = cellsApi.GetDocumentProperty(input,
propertyName, Utils.STORAGE, null);
System.out.println(" Author : " + apiResponse.getDocumentProperty().getValue());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
cellsApi.DeleteDocumentProperties(input, Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String propertyName = "Author";
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
cellsApi.DeleteDocumentProperty(input, propertyName, Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); }
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample7.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample7","xlsx", context.getResources().openRawResource(R.raw.sample7));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
String propertyName = "Author";
com.aspose.cells.model.CellsDocumentProperty body = new com.aspose.cells.model.CellsDocumentProperty();
body.setName("AsposeAuthor");
body.setValue("Aspose Plugin Developer");
body.setBuiltIn("false");
cellsApi.PutDocumentProperty(input, propertyName, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer rowIndex = 1;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.RowResponse apiResponse = cellsApi.PutInsertWorksheetRow(input, sheetName, rowIndex,
Utils.STORAGE, null);
System.out.println(" Row Href : " + apiResponse.getRow().getLink().getHref());
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String password = "";
Boolean isAutoFit = true;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.GetWorkBook(input, password, isAutoFit, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer sourceRowIndex = 1;
Integer destinationRowIndex = 2;
Integer rowNumber = 10;
String worksheet = "Sheet1";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostCopyWorksheetRows(input, sheetName, sourceRowIndex, destinationRowIndex, rowNumber, worksheet,
Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer rowIndex = 1;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.SaaSposeResponse apiResponse = cellsApi.DeleteWorksheetRow(input, sheetName,
rowIndex, Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
Integer rowIndex = 1;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.RowResponse apiResponse = cellsApi.GetWorksheetRow(input, sheetName, rowIndex,
Utils.STORAGE, null);
System.out.println(" Row Href : " + apiResponse.getRow().getLink().getHref());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer firstIndex = 1;
Integer lastIndex = 2;
Boolean hide = false;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostGroupWorksheetRows(input, sheetName, firstIndex, lastIndex, hide, Utils.STORAGE, Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); }
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer startrow = 1;
Integer totalRows = 1;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostHideWorksheetRows(input, sheetName, startrow, totalRows, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); }
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer firstIndex = 1;
Integer lastIndex = 2;
Boolean hide = false;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostUngroupWorksheetRows(input, sheetName, firstIndex, lastIndex, hide, Utils.STORAGE,
Utils.FOLDER);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
String output = "sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
Integer startrow = 1;
Integer totalRows = 1;
Double height = 2.0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostUnhideWorksheetRows(input, sheetName, startrow, totalRows, height, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile); }
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, null, inputFile);
String text = "aspose";
com.aspose.cells.model.TextItemsResponse apiResponse = cellsApi.PostWorkbooksTextSearch(input,
text, Utils.STORAGE, Utils.FOLDER);
for (com.aspose.cells.model.TextItem item : apiResponse.getTextItems().getTextItemList()) {
System.out.println("Text: " + item.getText());
System.out.println("Href: " + item.getLink().getHref());
System.out.println("");
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, null, inputFile);
String text = "aspose";
String sheetName = "Sheet1";
com.aspose.cells.model.TextItemsResponse apiResponse = cellsApi.PostWorkSheetTextSearch(input, sheetName,
text, Utils.STORAGE, Utils.FOLDER);
for (com.aspose.cells.model.TextItem item : apiResponse.getTextItems().getTextItemList()) {
System.out.println("Text: " + item.getText());
System.out.println("Href: " + item.getLink().getHref());
System.out.println("");
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, null, inputFile);
com.aspose.cells.model.TextItemsResponse apiResponse = cellsApi.GetWorkBookTextItems(input, null, null);
for (com.aspose.cells.model.TextItem item : apiResponse.getTextItems().getTextItemList()) {
System.out.println("Text: " + item.getText());
System.out.println("Href: " + item.getLink().getHref());
System.out.println("");
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheetName = "Sheet1";
storageApi.PutCreate(input, null, null, inputFile);
com.aspose.cells.model.TextItemsResponse apiResponse = cellsApi.GetWorkSheetTextItems(input,
sheetName, null, null);
for (com.aspose.cells.model.TextItem item : apiResponse.getTextItems().getTextItemList()) {
System.out.println("Text: " + item.getText());
System.out.println("Href: " + item.getLink().getHref());
System.out.println("");
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
String oldValue = "aspose";
String newValue = "aspose.com";
com.aspose.cells.model.WorkbookReplaceResponse apiResponse = cellsApi.PostWorkbooksTextReplace(input,
oldValue, newValue, Utils.STORAGE, Utils.FOLDER);
if (apiResponse != null && apiResponse.getStatus().equals("OK")) {
System.out.println("Matches: " + apiResponse.getMatches());
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
String oldValue = "aspose";
String newValue = "aspose.com";
String sheetName = "Sheet1";
com.aspose.cells.model.WorksheetReplaceResponse apiResponse = cellsApi.PostWorsheetTextReplace(input,
sheetName, oldValue, newValue, Utils.STORAGE, Utils.FOLDER);
if (apiResponse != null && apiResponse.getStatus().equals("OK")) {
System.out.println("Matches: " + apiResponse.getMatches());
}
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
ResponseMessage cr = cellsApi.GetWorkBookWithFormat("sample1.xlsx", "pdf", null, true,
Utils.STORAGE, Utils.FOLDER, null);
Utils.copyInputStreamToFile(cr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String format = "pdf";
String password = "";
String outPath = "";
String xml = "<PdfSaveOptions>" + "<SaveFormat>pdf</SaveFormat>" + "<FileName>"
+ "sample1.xlsx" + "</FileName>" + "<ImageCompression>Jpeg</ImageCompression>"
+ "<JpegQuality>70</JpegQuality>" + "<TextCompression>Flate</TextCompression>"
+ "</PdfSaveOptions>";
ResponseMessage cr = cellsApi.PutConvertWorkBook(format, password, outPath,inputFile,
xml.getBytes("UTF-8"));
Utils.copyInputStreamToFile(cr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String format = "pdf";
String password = "";
String outPath = "";
String xml = "<PdfSaveOptions>" + "<SaveFormat>pdf</SaveFormat>" + "<FileName>"
+ "sample1.xlsx" + "</FileName>" + "<ImageCompression>Jpeg</ImageCompression>"
+ "<JpegQuality>70</JpegQuality>" + "<TextCompression>Flate</TextCompression>"
+ "</PdfSaveOptions>";
ResponseMessage cr = cellsApi.PutConvertWorkBook(format, password, outPath, inputFile,
xml.getBytes("UTF-8"));
Utils.copyInputStreamToFile(cr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String output = "Sample-" + UUID.randomUUID().toString() ;
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file(output,"xlsx", context.getResources().openRawResource(R.raw.sample2));
cellsApi.PutWorkbookCreate(output, null, null, Utils.STORAGE, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(output, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String template = "Designer.xlsx";
String data = "ReportData.xml";
String output = "output-" + UUID.randomUUID();
File templateFile = Utils.stream2file("template","xlsx", context.getResources().openRawResource(R.raw.Designer));
File outputFile = Utils.stream2file("output","xlsx", context.getResources().openRawResource(R.raw.sample2));
File dataFile = Utils.stream2file("ReportData","xml", context.getResources().openRawResource(R.raw.ReportData));
storageApi.PutCreate(template, null, Utils.STORAGE, templateFile);
storageApi.PutCreate(data, null, Utils.STORAGE, dataFile);
cellsApi.PutWorkbookCreate(output, template, data, Utils.STORAGE, Utils.FOLDER, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(output, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String template = "Sample3.xls";
String output = "output-" + UUID.randomUUID() + ".xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File templateFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(template, null, Utils.STORAGE, templateFile);
cellsApi.PutWorkbookCreate(output, template, null, Utils.STORAGE, Utils.FOLDER, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(output, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),templateFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
com.aspose.cells.model.WorkbookEncryptionRequest properties = new com.aspose.cells.model.WorkbookEncryptionRequest();
properties.setEncryptionType("XOR");
properties.setPassword("12345678");
properties.setKeyLength(128);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteDecryptDocument(input, Utils.STORAGE, null, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
com.aspose.cells.model.WorkbookEncryptionRequest properties = new com.aspose.cells.model.WorkbookEncryptionRequest();
properties.setEncryptionType("XOR");
properties.setPassword("12345678");
properties.setKeyLength(128);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostEncryptDocument(input, Utils.STORAGE, null, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
storageApi.PutCreate(output, null, Utils.STORAGE, outputFile);
cellsApi.PostWorkbooksMerge(input, output, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.NamesResponse np = cellsApi.GetWorkBookNames(input, null, null);
System.out.println(np.getNames().getCount());
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
com.aspose.cells.model.WorkbookProtectionRequest properties = new com.aspose.cells.model.WorkbookProtectionRequest();
properties.setPassword("12345678");
properties.setProtectionType("All");
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
cellsApi.PostProtectDocument(input, Utils.STORAGE, null, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
cellsApi.DeleteDocumentUnProtectFromChanges(input, null, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
com.aspose.cells.model.PasswordRequest properties = new com.aspose.cells.model.PasswordRequest();
properties.setPassword("aspose");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PutDocumentProtectFromChanges(input, null, null, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "sample2.xlsx";
String format = "png";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
Integer from = 0;
Integer to = 2;
Integer horizontalResolution = null;
Integer verticalResolution = null;
storageApi.PutCreate(input, Utils.STORAGE, null, inputFile);
cellsApi.PostWorkbookSplit(input, format, from, to, horizontalResolution, verticalResolution,
Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
com.aspose.cells.model.WorkbookProtectionRequest properties = new com.aspose.cells.model.WorkbookProtectionRequest();
properties.setPassword("12345678");
properties.setProtectionType("None");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.DeleteUnProtectDocument(input, Utils.STORAGE, null, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
} catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
cellsApi.PutAddNewWorksheet("sample1.xlsx", "NewSheet", Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload("sample1.xlsx",
null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
String formula = "SUM(A1:A10)";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.SingleValueResponse r = cellsApi.GetWorkSheetCalculateFormula(
input, sheet, formula, Utils.STORAGE, null);
System.out.println("Result: " + r.getValue().getValue());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "output.png";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String format = "png";
Integer verticalResolution = null;
Integer horizontalResolution = null;
com.aspose.cells.model.ResponseMessage apiResponse = cellsApi.GetWorkSheetWithFormat(input,
sheetName, format, verticalResolution, horizontalResolution, Utils.STORAGE, Utils.FOLDER);
Utils.copyInputStreamToFile(apiResponse.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sourceSheet = "Sheet1";
String copySheet = "Sheet2";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostCopyWorksheet(input, copySheet, sourceSheet, null, Utils.STORAGE);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
String sheetName = "Sheet1";
cellsApi.DeleteWorkSheetBackground("sample1.xlsx", sheetName, Utils.FOLDER,
Utils.STORAGE);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload("sample1.xlsx",
null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.WorksheetsResponse wr = cellsApi.DeleteWorksheet(input, sheet, Utils.STORAGE, null);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
String sheetName = "Sheet1";
Integer row = 1;
Integer column = 1;
Integer freezedRows = 1;
Integer freezedColumns = 1;
cellsApi.PutWorksheetFreezePanes("sample1.xlsx", sheetName, row, column, freezedRows,
freezedColumns, Utils.FOLDER, Utils.STORAGE);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload("sample1.xlsx",
null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int autoshape = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.AutoShapeResponse ar = cellsApi
.GetWorksheetAutoshape(input, sheet, autoshape, Utils.STORAGE, null);
System.out.println("Autoshape HTML: " + ar.getAutoShape().getHtmlText());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int index = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ColumnResponse r = cellsApi
.GetWorksheetColumn("Sample1.xlsx", sheet, index, Utils.STORAGE, null);
System.out.println("Column: " + r.getColumn().getLink().getHref());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
String cell = "A1";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.CommentResponse r = cellsApi.GetWorkSheetComment("Sample1.xlsx",
sheet, cell, Utils.STORAGE, null);
System.out.println("Comment: " + r.getComment().getNote());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
String sheet = "Sheet1";
int index = 0;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.ValidationResponse r = cellsApi
.GetWorkSheetValidation(input, sheet, index, Utils.STORAGE, null);
System.out.println("Validation Type: " + r.getValidation().getType());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
com.aspose.cells.model.WorksheetsResponse wr = cellsApi.GetWorkSheets("sample1.xlsx",
Utils.STORAGE, null);
System.out.println("Count: " + wr.getWorksheets().getWorksheetList().size());
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
boolean isVisible = false;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.WorksheetResponse wr = cellsApi.PutChangeVisibilityWorksheet(input, sheet, isVisible,
Utils.STORAGE, null);
System.out.println("Visibility Type: " + wr.getWorksheet().getVisibilityType());
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet2";
com.aspose.cells.model.WorksheetMovingRequest move = new com.aspose.cells.model.WorksheetMovingRequest();
move.setDestinationWorksheet("Sheet5");
move.setPosition("after");
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.WorksheetsResponse wr = cellsApi.PostMoveWorksheet(input, sheet, Utils.STORAGE, null,
move);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String oldName = "Sheet1";
String newName = "Sheet2";
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostRenameWorksheet(input, oldName, newName, null, Utils.STORAGE);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample9","xlsx", context.getResources().openRawResource(R.raw.Sample9));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
File imageFile = Utils.stream2file("aspose","png", context.getResources().openRawResource(R.raw.aspose));
storageApi.PutCreate( "Sample1.xlsx", null, Utils.STORAGE, inputFile);
String sheetName = "Sheet1";
cellsApi.PutWorkSheetBackground( "Sample1.xlsx", sheetName, Utils.FOLDER, Utils.STORAGE,
imageFile);
com.aspose.storage.model.ResponseMessage sr = storageApi
.GetDownload( "Sample1.xlsx", null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheetName = "Sheet1";
String cellArea = "A1:A10";
com.aspose.cells.model.SortKey sort = new com.aspose.cells.model.SortKey();
sort.setKey(0);
sort.setSortOrder("descending");
com.aspose.cells.model.DataSorter body = new com.aspose.cells.model.DataSorter();
body.setCaseSensitive("false");
body.setHasHeaders("false");
body.setSortLeftToRight("false");
body.getKeyList().add(sort);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostWorksheetRangeSort(input, sheetName, cellArea, Utils.STORAGE, Utils.FOLDER, body);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
storageApi.PutCreate("sample1.xlsx", null, Utils.STORAGE, inputFile);
String sheetName = "Sheet1";
Integer row = 1;
Integer column = 1;
Integer freezedRows = 1;
Integer freezedColumns = 1;
cellsApi.DeleteWorksheetFreezePanes("sample1.xlsx", sheetName, row, column, freezedRows,
freezedColumns, Utils.FOLDER, Utils.STORAGE);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload("sample1.xlsx",
null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
boolean isVisible = true;
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
com.aspose.cells.model.WorksheetResponse wr = cellsApi.PutChangeVisibilityWorksheet(input, sheet, isVisible,
Utils.STORAGE, null);
System.out.println("Visibility Type: " + wr.getWorksheet().getVisibilityType());
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Cloud
try {
// Instantiate Aspose Storage API SDK
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true);
// Instantiate Aspose Words API SDK
CellsApi cellsApi = new CellsApi(Configuration.apiKey, Configuration.appSID, true);
String input = "Sample1.xlsx";
String output = "Sample2.xlsx";
File inputFile = Utils.stream2file("sample1","xlsx", context.getResources().openRawResource(R.raw.sample1));
File outputFile = Utils.stream2file("sample2","xlsx", context.getResources().openRawResource(R.raw.sample2));
String sheet = "Sheet1";
com.aspose.cells.model.Worksheet properties = new com.aspose.cells.model.Worksheet();
properties.setType("Worksheet");
properties.setName("Sheet1");
properties.setIsGridlinesVisible(true);
properties.setIsPageBreakPreview(true);
properties.setIsRulerVisible(true);
storageApi.PutCreate(input, null, Utils.STORAGE, inputFile);
cellsApi.PostUpdateWorksheetProperty(input, sheet, null, Utils.STORAGE, properties);
com.aspose.storage.model.ResponseMessage sr = storageApi.GetDownload(input, null, Utils.STORAGE);
Utils.copyInputStreamToFile(sr.getInputStream(),outputFile);
}
catch (Exception e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment