Skip to content

filgaia/asp-net-core-react-gsheet-reader

Repository files navigation

Introduction

Example of reading an Google Sheet with ASP.Net Core with React UI.

See a live Demo here

This project was bootstrapped with Create React App.

You can find some information on how to perform common tasks here.

This app was built with:

The App have:

  • Development server integration. In development mode, the development server from create-react-app runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.
  • Efficient production builds. In production mode, development-time features are disabled, and your dotnet publish configuration produces minified, efficiently bundled JavaScript files.

The ClientApp subdirectory is a standard React application based on the create-react-app template. If you open a command prompt in that directory, you can run npm commands such as npm test or npm install.

Google Sheet Reading

You need to follow the steps here to create a client-secret.json file

  • Go to the Google APIs Console.
  • Create a new project.
  • Click Enable API. Search for and enable the Google Drive API and the Google Sheets API.
  • Create credentials for a Web Server to access Application Data.
  • Name the service account and grant it a Project Role of Editor.
  • Download the JSON file.
  • Find the client_email entry. Copy this value and on your spreadsheet click the Share button and paste the email you just copied. This will give your project the correct access rights on that file.

Swagger integration

Created using Swashbuckle