Home Search

DriveWorks Pro 22
SppReadFileContents

Send Feedback

SppReadFileContents

Returns the contents of a file as a single string.

Supported file types include:

  • txt
  • html
  • css
  • json
  • xml

Syntax

SppReadFileContents([File Path])

Where:

File Path is the file name (including full path and extension) of the file to open.

When the function returns an error, the value:

#SPPREADFILECONTENTS!

will be returned.

Possible causes of this could be:

  • Incorrect path to the file
  • Invalid file or file type.

Example

RuleResult
SppReadFileContents("D:\DriveWorks\MyFile.txt")This is the contents of the specified text file.