The StaticPath.SK() function is used to save the output file to a specific folder or to get the input file from a specific folder.
To use StaticPath.SK() function, make sure that the staticFolders.config file is present in SheetKraft folder.
The staticFolder.config file contains key-value pairs where key is the folder name and value is the folder path.
<add key="Folder:<FolderName>" value="<StaticFolderPath>" />
<add key="Folder:Static_1" value="C:\Users\abc\Desktop\static_folder1" />
For multiple outputs of activity run to be stored in different folders, add multiple key/value pair in staticFolders.config file as shown in the following code:
<staticFolders> <add key="Folder:Static_1" value="C:\Users\abc\Desktop\static_folder_1" /> <add key="Folder:Static_2" value="C:\Users\abc\Desktop\static_folder_2" /> </staticFolders>
StaticPath.SK() function accepts two arguments:
When the activity workbook is run from the addin, the output file is generated in the static folder (Static_1) within the activity folder.
When the activity is run from the server, the output is stored within the static folder, that is, C:\Users\abc\Desktop\staticfolder1 which is the value of the corresponding key, that is, Static_1 as mentioned in the staticFolders.config file:
<add key="Folder:Static_1" value="C:\Users\abc\Desktop\static_folder_1" />
February 06, 2020 bySwanand Nirgudkar
For generating custom reports with complex formatting rules, SheetKraft's ExportToExcel Using…Continue Reading
February 02, 2020 bySwanand Nirgudkar
A quick reference for exporting to an XML document through SheetKraft Any form of organized or…Continue Reading
January 20, 2020 bySwanand Nirgudkar
While running an automated process, there may arise a need for the user to get some assistance on…Continue Reading