Static Folder Usage

Posted under features on September 25 , 2019 by Nidhisha Shetty


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.

Syntax:

<add key="Folder:<FolderName>" value="<StaticFolderPath>" />

Example:

<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:

  • Folder Name: This is the name of the folder where the output has to be saved or the input that is to be extracted. This name should be exactly the same as the key in staticFolders.config file (Static_1 in our case). This folder should be present in the activity folder so while running the activity from the add-in, it refers to this folder.
  • Path relative to folder: This is an optional argument. If the output/input file is in the path relative to the Folder Name field, this argument can be used.

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" />



TAGGED:ServerKey-ValueStatic FolderStatic Path


Let's talk

Address

7th floor, Unit No. 715, C Wing,
Kailas Business Park, S. Veer Savarkar Marg,
Park Site, Vikhroli (W), Mumbai-400079.

 

For General Queries & Technical Support

contactus@quantumphinance.com

 

For Sale and Demos

sales@quantumphinance.com