Skip to content

Commit

Permalink
Update Get sheet used range action
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Nistal committed Mar 26, 2024
1 parent 7151bd3 commit fa8c443
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Apps.GoogleSheets/Actions/SpreadsheetActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public async Task<RowsDto> GetUsedRange(
var client = new GoogleSheetsClient(InvocationContext.AuthenticationCredentialsProviders);
var request = client.Spreadsheets.Values.Get(spreadsheetFileRequest.SpreadSheetId, sheetRequest.SheetName);
var result = await request.ExecuteAsync();
return new RowsDto() { Rows = result.Values.Select(x => x.Select(y => y?.ToString() ?? string.Empty).ToList()).ToList() };
if (result != null && result?.Values != null)
{ return new RowsDto() { Rows = result?.Values?.Select(x => x.Select(y => y?.ToString() ?? string.Empty).ToList()).ToList() }; }
else return new RowsDto() { };
}

[Action("Download sheet CSV file", Description = "Download CSV file")]
Expand Down
2 changes: 1 addition & 1 deletion Apps.GoogleSheets/Apps.GoogleSheets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<Product>Google Sheets</Product>
<Description>Create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device</Description>
<Version>1.2.3</Version>
<Version>1.2.4</Version>
<AssemblyName>Apps.GoogleSheets</AssemblyName>
</PropertyGroup>
<ItemGroup>
Expand Down

0 comments on commit fa8c443

Please sign in to comment.