Difference between revisions of "ReadExportFile"
(CurrentDataDirectory is now CurrentDataFolder EW 14658) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | + | ''requires [[Analytica Enterprise]] or higher'' | |
− | Reads an array from a file that is in the [[Export-Import data format]]. This file format is produced when you use the | + | [[Category:Database Functions]] |
+ | [[category:File system functions]] | ||
+ | |||
+ | == ReadExportFile(filename'', showDialog'') == | ||
+ | Reads an array from a file that is in the [[Export-Import data format]]. This file format is produced when you use the [[File menu|File]] → '''Export''' menu command when viewing a table. | ||
Local indexes are created for each dimension in the file. | Local indexes are created for each dimension in the file. | ||
Line 12: | Line 14: | ||
The optional «showDialog» parameter can be set to true to force the file selection dialog to always appear. Doing so allows the user to change which file is read. | The optional «showDialog» parameter can be set to true to force the file selection dialog to always appear. Doing so allows the user to change which file is read. | ||
− | = Library = | + | == Library == |
+ | Database Functions | ||
− | + | == From ADE == | |
+ | When evaluated in [[ADE|the Analytica Decision Engine (ADE)]] and a dialog needs to be shown to the end-user, it calls [[IAdeUICallbacks::GetFilename]](...). From within that callback, the parent application can interact with the end-user to resolve the file path, and a web applications can instruct the end-user to upload a file. Once complete, the callback returns the full path to the file which is then read. To receive this callback, the parent application must have previously registered the callback with ADE using [[CAEngine::SetCallbackObject]]( ). If it has not registered a callback and the file doesn't exist, returns an empty text. | ||
− | = | + | ==History== |
+ | Introduced in [[Analytica 4.5]]. | ||
− | + | ADE callback introduced in [[Analytica 4.6|ADE 4.6]]. | |
+ | == See Also == | ||
* [[Export-Import data format]] | * [[Export-Import data format]] | ||
− | * [[Export]] command | + | * [[Export]] command (at present there isn't a [[WriteExportFile]] function. For now, the Export command can be used instead) |
* [[ReadTextFile]] | * [[ReadTextFile]] | ||
* [[ReadCsvFile]] | * [[ReadCsvFile]] | ||
+ | * [[Import and Export data]] | ||
+ | * [[Convert an Analytica multidimensional array into an Excel PivotTable]] |
Latest revision as of 17:09, 15 April 2024
requires Analytica Enterprise or higher
ReadExportFile(filename, showDialog)
Reads an array from a file that is in the Export-Import data format. This file format is produced when you use the File → Export menu command when viewing a table.
Local indexes are created for each dimension in the file.
When «filename» does not include a complete file path, the name is interpreted relative to the CurrentDataFolder.
The optional «showDialog» parameter can be set to true to force the file selection dialog to always appear. Doing so allows the user to change which file is read.
Library
Database Functions
From ADE
When evaluated in the Analytica Decision Engine (ADE) and a dialog needs to be shown to the end-user, it calls IAdeUICallbacks::GetFilename(...). From within that callback, the parent application can interact with the end-user to resolve the file path, and a web applications can instruct the end-user to upload a file. Once complete, the callback returns the full path to the file which is then read. To receive this callback, the parent application must have previously registered the callback with ADE using CAEngine::SetCallbackObject( ). If it has not registered a callback and the file doesn't exist, returns an empty text.
History
Introduced in Analytica 4.5.
ADE callback introduced in ADE 4.6.
See Also
- Export-Import data format
- Export command (at present there isn't a WriteExportFile function. For now, the Export command can be used instead)
- ReadTextFile
- ReadCsvFile
- Import and Export data
- Convert an Analytica multidimensional array into an Excel PivotTable
Enable comment auto-refresher