PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Possible conversion formats according to the source format
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
GglGetDocument (Function)
In French: GglRécupèreDocument
Downloads a document from the Google Docs service.
Warning
From version 20 (51), the management of Google documents evolves.
Indeed, the management of Google documents in WLanguage was using the "Google Documents List" service. The "Google Documents List" service will no longer be accessible from April 2015.

From now on, only the "Drive" API can be used. Using this API in your applications requires:
  • the declaration of the application in the Google console,
  • the activation of "Drive" API in the Google console.
See the help about gglConnect ("Prerequisite for the OAuth 2.0 authentication" paragraph) for more details.
The WLanguage functions and types used to manage the Google documents evolve in order to manage the "Drive" API from version 200051.
Note: If you are using an earlier version of WINDEV, WEBDEV or WINDEV Mobile, the functions for managing the Google documents can no longer be used from April 2015.
Example
// Connection
Cnt is gglConnection
...
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
END
...
arrDoc is array of gglDocument
arrDoc = GglListDocument(Cnt)
GglGetDocument(Cnt, arrDoc[1], "c:\temp\document.pdf")
Syntax
<Result> = GglGetDocument(<Google Connection> , <Document to Download> , <Destination Path>)
<Result>: Boolean
  • True if the document was retrieved,
  • False if a problem occurred. To find out the error details, use ErrorInfo.
<Google Connection>: gglConnection variable
Name of the gglConnection variable to use. This connection was validated by GglConnect.
Versions 20 and later
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
New in version 20
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
<Document to Download>: gglDocument variable
gglDocument variable corresponding to the document to download.
<Destination Path>: Unicode character string
Name and full path corresponding to the file to create from the downloaded document. If the extension of the file is specified, the file will be converted into this format when it is downloaded.
The format of source file is kept if the extension is not specified.
Remarks

Possible conversion formats according to the source format

The supported formats depend on the type of the source file. See Google documentation for more details.
Some examples:
  • The valid formats for a text document are as follows:
    • doc
    • html
    • jpeg
    • odt
    • pdf
    • png
    • rtf
    • txt
    • zip. In this case, the Zip archive contains the images (if necessary) used in the document as well as the HTML files containing the text of the document.
  • The valid formats for the drawings are as follows:
    • jpeg
    • pdf
    • png
    • svg
  • The valid formats for the presentations are as follows:
    • pdf
    • png
    • ppt
    • txt
  • The valid formats for the calculation sheets are as follows:
    • xls
    • csv: only the first calculation sheet is returned in CSV format.
    • pdf
    • ods
    • tsv: only the first calculation sheet is returned in TSV format.
    • html
Components
WINDEVWEBDEV - Server codeReports and Queries wd230ggl.dll
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment