Skip to content

Commit 309676a

Browse files
committed
20220822 update : support rotate row and column.
1 parent 3fc18f7 commit 309676a

File tree

4 files changed

+117
-7
lines changed

4 files changed

+117
-7
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
namespace Aspose.Cells.Cloud.SDK.Test
2+
{
3+
using System.IO;
4+
using System.Collections.Generic;
5+
using NUnit.Framework;
6+
using Aspose.Cells.Cloud.SDK.Api;
7+
using Aspose.Cells.Cloud.SDK.Model;
8+
/// <summary>
9+
/// Class for testing CellsWorkbookApi
10+
/// </summary>
11+
/// <remarks>
12+
/// This file is automatically generated by Swagger Codegen.
13+
/// Please update the test case below to test the API endpoint.
14+
/// </remarks>
15+
[TestFixture]
16+
public class Freeing2208Tests : CellsBaseTest
17+
{
18+
private CellsApi instance;
19+
private LightCellsApi lightInstance;
20+
/// <summary>
21+
/// Setup before each unit test
22+
/// </summary>
23+
[SetUp]
24+
public void Init()
25+
{
26+
instance = new CellsApi(clientId, clientSecret, apiVersion, testbaseurl);
27+
lightInstance = new LightCellsApi(clientId, clientSecret, apiVersion, testbaseurl);
28+
}
29+
30+
/// <summary>
31+
/// Clean up after each unit test
32+
/// </summary>
33+
[TearDown]
34+
public void Cleanup()
35+
{
36+
37+
}
38+
[Test]
39+
public void CellsCELLSCLOUD_PostRotate()
40+
{
41+
IDictionary<string, Stream> files = new Dictionary<string, Stream>();
42+
files.Add(BOOK1, GetTestDataStream(BOOK1));
43+
files.Add(MYDOC, GetTestDataStream(MYDOC));
44+
var filesResult = lightInstance.PostRotate(files, "90");
45+
Assert.IsInstanceOf<FilesResult>(filesResult, "response is AccessTokenResponse");
46+
}
47+
48+
49+
50+
}
51+
}

Aspose.Cells.Cloud.SDK/Api/LightCellsApi.cs

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ public interface ILightCellsApi
245245
/// <param name="format">File to upload</param>
246246
/// <returns>FilesResult</returns>
247247
FilesResult PostReverse(IDictionary<string, System.IO.Stream> files, string rotateType, string format = null, bool? checkExcelRestriction = true);
248+
FilesResult PostRotate(IDictionary<string, System.IO.Stream> files, string rotateType, string format = null, bool? checkExcelRestriction = true);
248249
}
249250

250251
/// <summary>
@@ -1466,5 +1467,64 @@ public FilesResult PostReverse(IDictionary<string, System.IO.Stream> files, stri
14661467
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
14671468
(FilesResult)Configuration.ApiClient.Deserialize(localVarResponse, typeof(FilesResult)))).Data;
14681469
}
1470+
1471+
public FilesResult PostRotate(IDictionary<string, System.IO.Stream> files, string rotateType, string format = null, bool? checkExcelRestriction = true)
1472+
{
1473+
checkAccessToken();
1474+
// verify the required parameter 'rotateType' is set
1475+
if (rotateType == null)
1476+
throw new ApiException(400, "Missing required parameter 'text' when calling LightCellsApi->PostReverse");
1477+
// verify the required parameter 'file' is set
1478+
if (files == null)
1479+
throw new ApiException(400, "Missing required parameter 'file' when calling LightCellsApi->PostReverse");
1480+
1481+
var localVarPath = "/cells/rotate";
1482+
var localVarPathParams = new Dictionary<String, String>();
1483+
var localVarQueryParams = new Dictionary<String, String>();
1484+
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
1485+
var localVarFormParams = new Dictionary<String, String>();
1486+
var localVarFileParams = new Dictionary<String, FileParameter>();
1487+
Object localVarPostBody = null;
1488+
1489+
// to determine the Content-Type header
1490+
String[] localVarHttpContentTypes = new String[] {
1491+
"multipart/form-data"
1492+
};
1493+
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
1494+
1495+
// to determine the Accept header
1496+
String[] localVarHttpHeaderAccepts = new String[] {
1497+
"application/json"
1498+
};
1499+
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
1500+
if (localVarHttpHeaderAccept != null)
1501+
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
1502+
1503+
if (rotateType != null) localVarQueryParams.Add("rotateType", Configuration.ApiClient.ParameterToString(rotateType)); // query parameter
1504+
if (format != null) localVarQueryParams.Add("newtext", Configuration.ApiClient.ParameterToString(format)); // query parameter
1505+
if (checkExcelRestriction != null) localVarQueryParams.Add("checkExcelRestriction", Configuration.ApiClient.ParameterToString(checkExcelRestriction)); // query parameter
1506+
1507+
foreach (KeyValuePair<string, System.IO.Stream> file in files)
1508+
{
1509+
localVarFileParams.Add(file.Key, Configuration.ApiClient.ParameterToFile(file.Key, file.Value));
1510+
}
1511+
1512+
// make the HTTP request
1513+
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
1514+
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
1515+
localVarPathParams, localVarHttpContentType);
1516+
1517+
int localVarStatusCode = (int)localVarResponse.StatusCode;
1518+
1519+
if (ExceptionFactory != null)
1520+
{
1521+
Exception exception = ExceptionFactory("PostReplace", localVarResponse);
1522+
if (exception != null) throw exception;
1523+
}
1524+
1525+
return (new ApiResponse<FilesResult>(localVarStatusCode,
1526+
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
1527+
(FilesResult)Configuration.ApiClient.Deserialize(localVarResponse, typeof(FilesResult)))).Data;
1528+
}
14691529
}
14701530
}

Aspose.Cells.Cloud.SDK/Aspose.Cells.Cloud.SDK.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<Description>This SDK allows you to work with Aspose.Cells Cloud REST APIs in your .NET applications quickly and easily, with zero initial cost.</Description>
1212
<Copyright>MIT</Copyright>
1313
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
14-
<AssemblyVersion>22.7</AssemblyVersion>
15-
<FileVersion>22.7</FileVersion>
16-
<Version>22.7</Version>
14+
<AssemblyVersion>22.8</AssemblyVersion>
15+
<FileVersion>22.8</FileVersion>
16+
<Version>22.8</Version>
1717
</PropertyGroup>
1818

1919
<ItemGroup>

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Nuget](https://img.shields.io/nuget/v/Aspose.Cells-Cloud) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Cells-Cloud) ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-dotnet)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-dotnet/22.7)
1+
![Nuget](https://img.shields.io/nuget/v/Aspose.Cells-Cloud) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Cells-Cloud) ![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-dotnet)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-dotnet/22.8)
22

33
# .NET SDK for Spreadsheet Processing in the Cloud
44

@@ -21,10 +21,9 @@ The Cloud SDK enhances your C#, ASP.NET, & other .NET-based cloud apps to [proce
2121
- [Leverage the power of Pivot Tables](https://docs.aspose.cloud/cells/working-with-pivot-tables/) & Ranges.
2222

2323

24-
## Feature & Enhancements in Version 22.7
24+
## Feature & Enhancements in Version 22.8
2525

26-
- Add 4 kinds of Save Option.
27-
- Add the checkExcelRestriction parameter for multiple APIs.
26+
- Support transposing Excel Rows to Columns.
2827

2928
## Read & Write Spreadsheet Formats
3029

0 commit comments

Comments
 (0)