Skip to content

Commit 427b3a4

Browse files
committed
1011997: Need to include new UG section for open-save file from Google Drive
1 parent eb11dca commit 427b3a4

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

Document-Processing/Excel/Spreadsheet/React/Open-Excel-File/from-google-drive.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public SpreadsheetController(IConfiguration configuration)
5555

5656
```
5757

58-
N> Note: Change your FolderId, CredentialPath, ApplicationName with your own
59-
6058
5. Create the `OpenExcelFromGoogleDrive()` method to open the document from the Google Drive.
6159

6260
```Csharp
@@ -142,7 +140,7 @@ public class FileOptions
142140

143141
```
144142

145-
N> Note: Install the Google.Apis.Drive.v3 NuGet package in the service project.
143+
N> Replace **Your Google Drive Folder ID**, **Your Application name**, and **Your Path to the OAuth 2.0 Client IDs json file** with your actual Google drive folder ID , Your name for your application and the path for the JSON file.
146144

147145
**Step 4:** Modify the index File in the Spreadsheet sample to make a fetch call to the server to retrieve and load the Excel file from the Google Drive into the client-side spreadsheet.
148146

@@ -176,4 +174,6 @@ const openFromGoogleDrive = () => {
176174
window.alert('Error importing file from Google Drive: ' + error);
177175
});
178176
};
179-
```
177+
```
178+
179+
N> Install the Google.Apis.Drive.v3 NuGet package must be installed in your application to use the previous code example.

Document-Processing/Excel/Spreadsheet/React/Save-Excel-File/to-google-drive.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,26 @@ public async Task<IActionResult> SaveExcelToGoogleDrive([FromForm] SaveSettings
139139

140140
```
141141

142-
**Step 4:** Modify the index File in the Spreadsheet sample to using [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to serialize the spreadsheet and send it to the back-end
142+
* Open the `appsettings.json` file in your web service project, Add the following lines below the existing `"AllowedHosts"` configuration
143+
144+
```json
145+
{
146+
"Logging": {
147+
"LogLevel": {
148+
"Default": "Information",
149+
"Microsoft.AspNetCore": "Warning"
150+
}
151+
},
152+
"AllowedHosts": "*",
153+
"FolderId": "Your Google Drive Folder ID",
154+
"CredentialPath": "Your Path to the OAuth 2.0 Client IDs json file",
155+
"ApplicationName": "Your Application name"
156+
}
157+
```
158+
159+
N> Replace **Your Google Drive Folder ID**, **Your Application name**, and **Your Path to the OAuth 2.0 Client IDs json file** with your actual Google drive folder ID , Your name for your application and the path for the JSON file.
160+
161+
**Step 4:** Modify the index file in the Spreadsheet sample to use the [`saveAsJson`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to serialize the spreadsheet and send the JSON to the backend.
143162

144163
```js
145164
<button class="e-btn" onClick={saveToGoogleDrive}>
@@ -178,4 +197,4 @@ const saveToGoogleDrive = () => {
178197
};
179198
```
180199

181-
N> Note: Install the Google.Apis.Drive.v3 NuGet package in the service project.
200+
N> Install the Google.Apis.Drive.v3 NuGet package must be installed in your application to use the previous code example.

0 commit comments

Comments
 (0)