
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
react-native-google-sheet
Advanced tools
A <GoogleSheet /> component for react-native to access Google Sheets API which gives you full control over the content and appearence of your spreadsheet data.
A <GoogleSheet />
component for react-native no native code added light weight library to access Google Sheets API which gives you full control over the content and appearence of your spreadsheet data.
No setup, no linking required, use it like a component.
This module uses Sheet V4 API.
npm i --save react-native-google-sheet
or
yarn add react-native-google-sheet
IMPORTANT: Google recently deprecated their ClientLogin (username+password) access, so things are slightly more complicated now. Older versions of this module supported it, so just be aware that things changed.
By default, this module makes unauthenticated requests and can therefore only access spreadsheets that are "public".
The Google Spreadsheets Data API reference and developers guide is a little ambiguous about how you access a "published" public Spreadsheet.
If you wish to work with a Google Spreadsheet without authenticating, not only must the Spreadsheet in question be visible to the web, but it must also have been explicitly published using "File > Publish to the web" menu option in the google spreadsheets GUI.
Many seemingly "public" sheets have not also been "published" so this may cause some confusion.
Note: react-native-google-sheet
doesnt support public doc access as it doesnt required a module for it. This module is notrequires. Docs is enough to do so.
This is a 2-legged oauth method and designed to be "an account that belongs to your application instead of to an individual end user". Use this for an app that needs to access a set of documents that you have full access to. (read more)
name | desc | type | default |
---|---|---|---|
spreadsheetId | Id of the spread sheet | string How to find the id | '' |
credentialsDetails | Google client details | object | {redirectUrl: '', clientId:''} |
import GoogleSheet, { batchGet } from 'react-native-google-sheet';
export default function LaunchScreen() {
const clientId = 'YOUR_CLIENT_ID';
const GOOGLE_REDIRECT_URI = 'http://localhost';
function _onPressButton() {
batchGet().then(item => {
console.log(item);
}).catch(e => console.log(e))
}
return (
<View style={[styles.mainContainer]}>
<GoogleSheet
credentialsDetails={{
redirectUrl: GOOGLE_REDIRECT_URI,
clientId,
}}
spreadsheetId="YOUR_SHEET_ID"
/>
<TouchableOpacity onPress={_onPressButton}>
<Text>Get Data</Text>
</TouchableOpacity>
</View>
)
}
For more, read the API Reference. If you're interested in contributing, check out the Contributing Guide.
Just one dependency react-native-webview
Help to make it better! Please see CONTRIBUTING.md for more details.
License
MIT License
FAQs
A <GoogleSheet /> component for react-native to access Google Sheets API which gives you full control over the content and appearence of your spreadsheet data.
The npm package react-native-google-sheet receives a total of 1 weekly downloads. As such, react-native-google-sheet popularity was classified as not popular.
We found that react-native-google-sheet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.