Home | Sign in | English UK
  • Possible error cases:
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
<gglConnection variable>.ListDocument (Function)
In french: <Variable gglConnexion>.ListeDocument
Retrieves the list of documents available on the Google server for the current user.
// Connection
Cnt is gglConnection
IF Cnt.Connect() =False THEN
// List of all documents
arrDocuments is array of 0 gglDocument dynamic
arrDocuments = Cnt.ListDocument()
// List the documents containing the "Test" text
arrDocuments = Cnt.ListDocument("fullText contains 'Test'")
// List of favorite text documents found in the "Custom" folder
arrDocuments = Cnt.ListDocument(gglWordProcessing, "Custom")
// Display the title of each listed document
Doc is gglDocument dynamic
FOR EACH Doc OF arrDocuments

Syntax kept for backward compatibility, adapted to the "Drive" API Hide the details

<Result> = <Google connection>.ListDocument([<Filter> [, <Folder> [, <String to find>]]])
<Result>: Array of gglDocument variables
Array of gglDocument variables: each array element contains the characteristics of a document found on the Google server.
<Google connection>: gglConnection variable
Name of the gglConnection variable to use. This connection was validated by <gglConnection variable>.Connect.
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.
<Filter>: Optional Integer constant
Indicates the type of document to list:
gglWorksheetLists the "Worksheets" files only (files with a csv, xls or ods extension).
gglPresentationLists the "Presentation" files only (files with a ppt or pps extension).
gglStarredConstant that can be combined with the other choices. Used to retrieve the documents tagged as "starred".
(Default value)
Lists all the documents found on the Google server in the specified folder.
gglWordProcessingLists the "Word processing" files only (files with a txt, rtf, doc, odt, sxw or html extension)
<Folder>: Optional character string (with quotes)
Name of the folder containing the files to list. If this parameter is not specified, all the files found in all the folders are taken into account.
<String to find>: Optional character string (with quotes)
Search formula. See the documentation about the "Drive" API to find out the parameters that can be used: https://developers.google.com/drive/web/search-parameters

Possible error cases:

  • The Internet connection is not valid.
  • The authentication was not performed properly.
  • Caution: you cannot perform a search that is using both:
    • a filter applied to a type of document,
    • a filter applied to the "Starred" documents,
    • a filter applied to a specific folder.
Related Examples:
Accessing the Google documents Unit examples (WINDEV): Accessing the Google documents
[ + ] Using the gglXxx functions to access the documents defined in your Google account.
Component : wd250ggl.dll
Minimum version required
  • Version 24
This page is also available for…
Click [Add] to post a comment