Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get spreadsheet that contains sheet id (gid)? #11

Open
soutot opened this issue Mar 24, 2017 · 3 comments
Open

How to get spreadsheet that contains sheet id (gid)? #11

soutot opened this issue Mar 24, 2017 · 3 comments

Comments

@soutot
Copy link

soutot commented Mar 24, 2017

Hi,

I have 2 spreadsheets that looks like this:
https://docs.google.com/spreadsheets/d/1234abcd/pub?gid=0&single=true&output=xlsx
https://docs.google.com/spreadsheets/d/1234abcd/pub?gid=09876&single=true&output=xlsx

How do I specify which spreadsheet from id 1234abcd I want to work with?
I couldn't find any property like "worksheet_id", neither I was able to use the gid querystring in "spreadsheedId" property.

Thanks in advance

@bassarisse
Copy link
Owner

Hey there,

You can use the worksheet option, passing the name or the index of the desired worksheet (-w or --worksheet in command-line).

@damianobarbati
Copy link

damianobarbati commented Oct 13, 2017

+1 for this feature: @bassarisse actually the "gid" is not working

const assets = await gsjson({
    spreadsheetId: '1WXQ4mmU0lKSIivxejPdrS7SHgxQCIxnJ8evVLWszuKs',
    worksheet: ['380908001'],
});      
Failure: Error: No worksheet found!

You did a great job with this repo!

@bassarisse
Copy link
Owner

Sorry if I didn't make myself clear. Matching the worksheet by the "gid" is currently not supported, ony by name or index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants