From e1929424387713fd71ed75f6d03b0b360126bebf Mon Sep 17 00:00:00 2001 From: KurmithaSF4004 Date: Fri, 2 Aug 2024 19:26:37 +0530 Subject: [PATCH] Loading and Saving --- .../Edit Excel/Edit Excel/Controllers/HomeController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Loading and Saving/Google Drive/Saving/Edit Excel/Edit Excel/Controllers/HomeController.cs b/Loading and Saving/Google Drive/Saving/Edit Excel/Edit Excel/Controllers/HomeController.cs index 723ed34c..7c58def4 100644 --- a/Loading and Saving/Google Drive/Saving/Edit Excel/Edit Excel/Controllers/HomeController.cs +++ b/Loading and Saving/Google Drive/Saving/Edit Excel/Edit Excel/Controllers/HomeController.cs @@ -54,7 +54,7 @@ public async Task EditDocument() public async Task GetDocumentFromGoogleDrive() { //Define the path to the service account key file - string pathtoserviceaccountkey = "Your_service_account_key_path"; + string serviceAccountKeyPath = "Your_service_account_key_path"; //Specify the FileID of the file to download string fileID = "Your_file_id"; @@ -62,7 +62,7 @@ public async Task GetDocumentFromGoogleDrive() try { //Authenticate the Google Drive API access using the service account key - GoogleCredential credential = GoogleCredential.FromFile(pathtoserviceaccountkey).CreateScoped(DriveService.ScopeConstants.Drive); + GoogleCredential credential = GoogleCredential.FromFile(serviceAccountKeyPath).CreateScoped(DriveService.ScopeConstants.Drive); //Create the Google Drive service DriveService service = new DriveService(new BaseClientService.Initializer()