Add document (-ADOC) command

The -ADOC command adds a file on the local file system, or a remote file accessible through HTTP protocol, as a document in memory, and returns the document ID to the map. Alternatively, the -ADOC command can add dynamic data from a map as a document in memory and return the document ID to the map.

Read syntax diagramSkip visual syntax diagram
-ADOC command syntax

>>--- -ADOC----+--------+--+- -FILE file_URL-+-----------------><
               '-doc_ID-'  '-data_from_map---'   

-FILE
Adds a single file, specified by a local file URL (file:///), or remote file URL (http:///), as a document in memory, and returns a document ID to the map. The -FILE keyword is optional, but you must specify either the -FILE, or the data_from_map option on the -ADOC command. The doc_ID parameter is optional. If specified, the -ADOC command associates the user-specified identifier for the document in memory and returns the same. If not specified, the -ADOC command generates a unique document identifier for the document in memory.
data_from_map
Adds dynamic data from a map as a document in memory and returns the document ID to the map. The data_from_map is optional, but you must specify either the -FILE, or the data_from_map option on the -ADOC command.

Examples

The following example adds the parsewds.txt file as a document in memory and returns the adapter generated, unique document ID to the map:
=GET("EXCEL", "-FILE file:///C:\parsewds.txt -ADOC")

The following example adds the Hello World!! text string as a document in memory and returns mydocid to the map:

=GET("EXCEL", "-ADOC mydocid", "Hello World!!")