Skip to content

Commit 8b8fb9d

Browse files
committed
Update merge spreadsheet feature.
1 parent 0e476a4 commit 8b8fb9d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<RepositoryType>GitHub</RepositoryType>
1818
<Copyright>MIT</Copyright>
1919
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
20-
<AssemblyVersion>25.5.4</AssemblyVersion>
21-
<FileVersion>25.5.4</FileVersion>
22-
<Version>25.5.4</Version>
20+
<AssemblyVersion>25.6.1</AssemblyVersion>
21+
<FileVersion>25.6.1</FileVersion>
22+
<Version>25.6.1</Version>
2323
<PackageReadmeFile>README.md</PackageReadmeFile>
2424

2525
</PropertyGroup>

Aspose.Cells.Cloud.SDK/Request/MergeSpreadsheetsRequest.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public MergeSpreadsheetsRequest()
5555
/// <param name="fontsLocation">Use Custom fonts.</param>
5656
/// <param name="regoin">The spreadsheet region setting.</param>
5757
/// <param name="password">The password for opening spreadsheet file.</param>
58-
public MergeSpreadsheetsRequest(string spreadsheet, string outFormat = null, bool? mergeInOneSheet = null, string outPath = null, string outStorageName = null, string fontsLocation = null, string regoin = null, string password = null)
58+
public MergeSpreadsheetsRequest(IDictionary<string, System.IO.Stream> spreadsheet, string outFormat = null, bool? mergeInOneSheet = null, string outPath = null, string outStorageName = null, string fontsLocation = null, string regoin = null, string password = null)
5959
{
6060
this.Spreadsheet = spreadsheet;
6161
this.outFormat = outFormat;
@@ -70,7 +70,7 @@ public MergeSpreadsheetsRequest(string spreadsheet, string outFormat = null, b
7070
/// <summary>
7171
/// Upload spreadsheet file.
7272
/// </summary>
73-
public string Spreadsheet { get; set; }
73+
public IDictionary<string, System.IO.Stream> Spreadsheet { get; set; }
7474

7575

7676
/// <summary>
@@ -132,7 +132,7 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
132132
string localVarPostBody ="";
133133
string localVarHttpContentType = "application/json";
134134
// verify the required parameter 'spreadsheet' is set
135-
if ( string.IsNullOrEmpty(this.Spreadsheet) )
135+
if ( this.Spreadsheet == null )
136136
{
137137
throw new ApiException(400, "Missing required parameter 'spreadsheet' when calling MergeSpreadsheets");
138138
}
@@ -158,12 +158,13 @@ public HttpWebRequest CreateHttpRequest(string baseUri,IDictionary<string, strin
158158
}
159159
}
160160

161-
if (!string.IsNullOrEmpty(Spreadsheet ) && System.IO.File.Exists(Spreadsheet )) {
162-
System.IO.FileInfo fileInfo = new System.IO.FileInfo(Spreadsheet);
163-
localVarFileParams.Add(fileInfo.Name, UrlHelper.ToFileInfo(System.IO.File.OpenRead(Spreadsheet), fileInfo.Name));
164-
}
165-
166-
161+
162+
if (Spreadsheet != null){
163+
foreach (KeyValuePair<string, System.IO.Stream> keyValueFileParam in Spreadsheet )
164+
{
165+
localVarFileParams.Add(keyValueFileParam.Key, UrlHelper.ToFileInfo(keyValueFileParam.Value, keyValueFileParam.Key));
166+
}
167+
}
167168

168169
return UrlHelper.PrepareRequest(path, "PUT", localVarFileParams, localVarHeaderParams, localVarPostBody, localVarHttpContentType, defaultHeaderMap, requestHandlers);
169170
}

0 commit comments

Comments
 (0)