简体   繁体   English

如何访问重命名的Google表格

[英]How to access renamed google sheets

I have a google sheets workbook whose sheets get continuously re-ordered. 我有一本Google工作表,其工作表不断地重新排序。 I am able to read each sheet using wks = gc.open("DatSheet").sheet1 , but this will always get data from the sheet in first position. 我可以使用wks = gc.open("DatSheet").sheet1读取每张工作表,但这总是从工作表的第一个位置获取数据。 How can i use individual sheet names to access them, for example: wks = gc.open("DatSheet").uniquename ? 我如何使用单个工作表名称来访问它们,例如: wks = gc.open("DatSheet").uniquename

You can use the worksheet function to get a worksheet based on title, index or id. 您可以使用工作表功能根据标题,索引或ID获取工作表。 Or you can just use worksheet_by_title . 或者,您可以只使用worksheet_by_title

So in your case 所以你的情况

gc.open("DatSheet").worksheet_by_title("sheet name")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM