Skip to main content Skip to complementary content

Get the data format of a file

Get the data format of a file by using the GuessFileType method.

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format

  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTMLfor HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file

Example

The goal is to get the data format of a file. The name of the file is books.xml.

The client sends:

{ "jsonrpc": "2.0", "id": 12, "method": "GuessFileType", "handle": 1, "params": [ "AB8A2202-B853C624-22FCF5E7-8E28162D-DF4B5E8C", "E:\\TFS\\Ver12.00\\dev\\ft-core\\test\\Platform\\qlikviewTests\\ProtocolTester4Net\\TestData\\Util\\books.xml" ] }

The engine returns:

{ "jsonrpc": "2.0", "id": 12, "result": { "qDataFormat": { "qType": "XML", "qDelimiter": { "qNumber": 0 }, "qCodePage": 0, "qHeaderSize": 0, "qRecordSize": 0, "qTabSize": 0 } } }

The data format of the file books.xml is returned. The type of the file is XML.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!