Skip to content

Commit 9aec00f

Browse files
committed
fix blog.
1 parent 48a69e7 commit 9aec00f

File tree

4 files changed

+75
-7
lines changed

4 files changed

+75
-7
lines changed

Aspose.Cells.Cloud.SDK.sln

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.13.36105.23 d17.13
4+
VisualStudioVersion = 17.13.36105.23
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspose.Cells.Cloud.SDK", "Aspose.Cells.Cloud.Sdk\Aspose.Cells.Cloud.SDK.csproj", "{13284D1A-8B08-469A-A58B-5C94B92C68E7}"
77
EndProject
@@ -17,6 +17,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
README.md = README.md
1818
EndProjectSection
1919
EndProject
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspose.Cells.Cloud.SDK.Test", "Aspose.Cells.Cloud.SDK.Test\Aspose.Cells.Cloud.SDK.Test.csproj", "{933EEC75-1A3B-67B8-A801-3F3391516789}"
21+
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aspose.Cells.Cloud.SDK.Examples", "examples\Aspose.Cells.Cloud.SDK.Examples.csproj", "{1695AA94-4494-89E3-6874-28F5BE3CDB49}"
23+
EndProject
2024
Global
2125
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2226
Debug|Any CPU = Debug|Any CPU
@@ -39,6 +43,30 @@ Global
3943
{13284D1A-8B08-469A-A58B-5C94B92C68E7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
4044
{13284D1A-8B08-469A-A58B-5C94B92C68E7}.Release|x86.ActiveCfg = Release|Any CPU
4145
{13284D1A-8B08-469A-A58B-5C94B92C68E7}.Release|x86.Build.0 = Release|Any CPU
46+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
49+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
50+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|x86.ActiveCfg = Debug|Any CPU
51+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Debug|x86.Build.0 = Debug|Any CPU
52+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
55+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|Mixed Platforms.Build.0 = Release|Any CPU
56+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|x86.ActiveCfg = Release|Any CPU
57+
{933EEC75-1A3B-67B8-A801-3F3391516789}.Release|x86.Build.0 = Release|Any CPU
58+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|Any CPU.Build.0 = Debug|Any CPU
60+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
61+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
62+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|x86.ActiveCfg = Debug|Any CPU
63+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Debug|x86.Build.0 = Debug|Any CPU
64+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
67+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|Mixed Platforms.Build.0 = Release|Any CPU
68+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|x86.ActiveCfg = Release|Any CPU
69+
{1695AA94-4494-89E3-6874-28F5BE3CDB49}.Release|x86.Build.0 = Release|Any CPU
4270
EndGlobalSection
4371
GlobalSection(SolutionProperties) = preSolution
4472
HideSolutionNode = FALSE
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Aspose.Cells.Cloud.SDK.Api;
2+
using Aspose.Cells.Cloud.SDK.Model;
3+
using Aspose.Cells.Cloud.SDK.Request;
4+
using FileInfo = Aspose.Cells.Cloud.SDK.Model.FileInfo;
5+
6+
public static class ExampleBlog_TextProcessing_TrimContent
7+
{
8+
public static void Run()
9+
{
10+
CellsApi cellsApi = new CellsApi("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
11+
PostTrimContentRequest request = new PostTrimContentRequest
12+
{
13+
trimContentOptions = new TrimContentOptions
14+
{
15+
DataSource = new DataSource { DataSourceType = "RequestFiles" },
16+
FileInfo = new FileInfo
17+
{
18+
Filename = "BookText.xlsx",
19+
FileContent = System.Convert.ToBase64String(System.IO.File.ReadAllBytes("BookText.xlsx"))
20+
},
21+
RemoveAllLineBreaks = true,
22+
RemoveExtraLineBreaks = true,
23+
TrimSpaceBetweenWordTo1 = true,
24+
ScopeOptions = new ScopeOptions
25+
{
26+
Scope = "SelectionOlny",
27+
ScopeItems = new System.Collections.Generic.List<ScopeItem> {
28+
new ScopeItem {
29+
WorksheetName = "Sales",
30+
Ranges = new System.Collections.Generic.List<string> { "B1:B3"}
31+
} }
32+
}
33+
}
34+
};
35+
cellsApi.PostTrimContent(request);
36+
}
37+
}

examples/Example_ChartToImage.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ public class CellsApiExample
1111
{
1212
string CellsCloudClientId ="....";//get from https://dashboard.aspose.cloud/#/applications
1313
string CellsCloudClientSecret="...";//get from https://dashboard.aspose.cloud/#/applications
14-
ExampleXlsx = "example.xlsx";
15-
RemoteFolder = "NetSDK";
14+
string ExampleXlsx = "example.xlsx";
15+
string RemoteFolder = "NetSDK";
1616

1717
public void Example()
18-
{
19-
var uploadRequest = new UploadFileRequest(ExampleXlsx, RemoteFolder + "/" + ExampleXlsx);
18+
{
19+
CellsApi cellsApi = new CellsApi("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
20+
var uploadRequest = new UploadFileRequest(ExampleXlsx, RemoteFolder + "/" + ExampleXlsx);
2021
cellsApi.UploadFile(uploadRequest);
2122
var request = new GetWorksheetChartRequest(
2223
name: ExampleXlsx,

examples/Example_QuickStart.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ public class CellsApiExample
1212
CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("ProductClientId"), Environment.GetEnvironmentVariable("ProductClientSecret"));
1313
public void ExampleQuickstart()
1414
{
15-
var request = new PutConvertWorkbookRequest { localPath = "EmployeeSalesSummary.xlsx", format = "pdf" };
15+
var request = new PutConvertWorkbookRequest { LocalPath = "EmployeeSalesSummary.xlsx", format = "pdf" };
1616
var response = cellsApi.PutConvertWorkbook(request);
1717
if (response != null && response.Length > 0)
1818
{
19-
File.WriteAllBytes("EmployeeSalesSummary.pdf", response);
19+
byte[] data = new byte[response.Length];
20+
response.Read(data, 0, data.Length);
21+
File.WriteAllBytes("EmployeeSalesSummary.pdf", data);
2022
Console.WriteLine("File converted and saved.");
2123
}
2224
}

0 commit comments

Comments
 (0)