google spreadsheet - Get column headers with query language -


i'm using query language query data spreadsheet. retrieve first row(column headers), how do that?

currently i'm using: select * ( = -1 ) , data in column never equal -1, returns column headers.

is there straightforward way this?

you can use query(a:z, "select * limit 0", 1) meaning: select all, return @ 0 rows. result header row returned (the 3rd parameter make clear there 1 header row).

but it's not natural use query purpose. function array_constrain provided purpose of truncating array of data. example,

=array_constrain(a:z, 1, 1e7) 

returns first row of given array. (since no limit on number of columns needed, gave 1e7 = 10,000,000 maximal number of columns. spreadsheet can't have many cells.)


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -