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


Recent Posts


Export To Excel Using Template

February 06, 2020 bySwanand Nirgudkar

For generating custom reports with complex formatting rules, SheetKraft's ExportToExcel Using…

Continue Reading

Export to XML

February 02, 2020 bySwanand Nirgudkar

A quick reference for exporting to an XML document through SheetKraft Any form of organized or…

Continue Reading

Display Inputs and Calculate Immediately Outputs

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

Exporting Double Quotes Within a Text File

November 19, 2019 byShubham Thakkar

When dealing with automatic messaging systems, we often have to use some conventions in our input…

Continue Reading

Let's talk

Address

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

 

Phone

+91 22 62362043

 

For General Queries & Technical Support

contact@quantumphinance.com

 

For Sale and Demos

sales@quantumphinance.com