使用Google Spreadsheet API,但标题行中的值小写且空格已删除 [英] Using Google Spreadsheet API without having values in header row in lower case with spaces removed

查看:68
本文介绍了使用Google Spreadsheet API,但标题行中的值小写且空格已删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道使用Google Spreadsheet API是否有任何解决方法(阅读:hacks),该方法没有施加限制,使标题行中的值小写且没有空格. 我知道我只能使用基于单元格的提要,但是这会增加我的应用程序的开销,必须跟踪与特定列名对应的列号.

I was wondering if there is any way around (read: hacks) using the Google Spreadsheet API that doesn't impose the restriction of having the values in the header row in lowercase with no spaces. I'm aware that I can just make use of the cell based feed but that would have an overhead of my application having to track what column number corresponds to a particular column name.

有人有替代方法吗?

((我还注意到 Google Spreadsheet API文档没有任何作用)提到标题行名称限制,我不得不四处搜寻以找出为什么我的代码最初无法正常工作

(Also I noticed that the Google Spreadsheet API Docs doesn't make any mention of the header row name restriction, I had to search around to find out why my code wasn't working initially)

推荐答案

您不必实际更改电子表格中的任何标题,也不必进行任何限制.基本上,API会将标头转换为小写的无空格"格式,您可以这样访问它们.因此,尝试通过查询列"myheader"来访问标题为"My Header"的列.原始电子表格中的标题保持不变,并保持所需的格式.

You don't have to actually change any headers in your spreadsheet and bent to some restrictions. Basically the API transforms your headers into the "lowercase no-space" format and you can access them as such. So trying to access a column with a header "My Header" would work by querying the column "myheader". The headers in the original spreadsheet remain unchanged and in the desired format.

这篇关于使用Google Spreadsheet API,但标题行中的值小写且空格已删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆