How do I access the Google Spreadsheets API in PHP?

前端 未结 3 469
囚心锁ツ
囚心锁ツ 2020-12-06 04:40

Starting with the Google Developer documentation on the Google Spreadsheets API, I found that \"A number of client libraries are provided in various languages.\", but Google

3条回答
  •  爱一瞬间的悲伤
    2020-12-06 05:40

    (Aug 2016)

    As of this past May, you now have a better solution...

    No more passing the buck:

    1. GData APIs (and thus Zend GData) are the previous generation of Google APIs. While not all GData APIs have been deprecated, all newer Google APIs do not use the Google Data protocol.
    2. There is a "new" Google Sheets API v4 (not GData]). In order to use the new Sheets API, you need to get the Google APIs Client Library for PHP as others have already stated. The latest API is much more powerful and flexible than any previous API. Here's one code sample to help get you started. If you're not "allergic" to Python, I also made a video with a different, slightly longer example introducing the API and gave a deeper dive into its code via a blogpost that you can learn from.

    Note the Sheets API allows you to create spreadsheets & sheets, upload & download data, as well as, in the general sense, programmatically access a Sheet as if you were using the user interface (create frozen rows, perform cell formatting, resizing rows/columns, adding pivot tables, creating charts, etc.), but to perform file-level access such as uploads & downloads, imports & exports (same as uploads & downloads but conversion to/from Google Apps formats), you would use the Google Drive API instead.

提交回复
热议问题