// 生产环境中请使用 HTTPS 端点。
public void Run_PivotTable_Move()
{
url = @"https://api.aspose.com/v3.0/storage/file/Temp/V17.02.00_01.xlsx";
using (HttpWebResponse response = _helper.CallDelete(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = @"https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx?folder=Temp";
using (HttpWebResponse response = _helper.CallPut(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = @"https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/worksheets/PivotSheet?folder=Temp";
using (HttpWebResponse response = _helper.CallPut(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = @"https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/worksheets/Sheet2?folder=Temp";
using (HttpWebResponse response = _helper.CallPut(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = @"https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/importdata?folder=Temp";
data = "{ \"BatchData\":[{\"rowIndex\":0,\"columnIndex\":0,\"type\":\"String\",\"value\":\"Sport\",\"style\":null}, ... ],\"DestinationWorksheet\":\"Sheet2\",\"IsInsert\":false}";
using (HttpWebResponse response = _helper.CallPost(url, data, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = "https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/worksheets/PivotSheet/pivottables?folder=Temp";
data = "{\"Name\":\"TestPivot\",\"SourceData\":\"=Sheet2!A1:E8\",\"DestCellName\":\"C1\",\"UseSameSource\":true,\"PivotFieldRows\":[0,1],\"PivotFieldColumns\":[2],\"PivotFieldData\":[3,4]}";
using (HttpWebResponse response = _helper.CallPut(url, data, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = "https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/worksheets/PivotSheet/pivottables/0/Move?row=10&column=10&folder=Temp";
using (HttpWebResponse response = _helper.CallPost(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
url = "https://api.aspose.com/v3.0/cells/V17.02.00_01.xlsx/worksheets/PivotSheet/pivottables/0/PivotField/Move?fieldIndex=1&from=Row&to=Column&folder=Temp";
using (HttpWebResponse response = _helper.CallPost(url, string.Empty, contentType))
{
Assert.AreEqual(response.StatusCode, HttpStatusCode.OK);
}
}