Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The figure below illustrates the Component Properties Sheet (CPS) properties.

Image RemovedImage Added
Figure 1: Component Configuration properties

...

Tip

Refer Error Handling section in the Common Configurations page for detailed information.

Sheet Name

The Worksheet Name to be updated.

...

name of the excel sheet which needs to be created and into which the data needs to be updated or appended. The default name is Sheet1.

Field Delimiter

Field Delimiter to separate the fields in a record. The tab can be given as \t. The default value is , (comma)

Record Delimiter

The delimiter used to separate the Records. The default value is \n.

Output Mode

  • Append: The data will be updated in the existing excel file.
  • New file for each message: A new excel file will be created for each input message.

Excel File Path

Path of the input excel file to be chosen.updated including the file name. It is enabled when Output Mode is selected as "Append".

Note
  • The microservice runs on the peer server and therefore the file paths and directories mentioned in the CPS should be valid on the machine where the peer server is running.
  • If the microservice fails over to another peer server, ensure that the machine on which the secondary peer server is running carries the same path.
Field Delimiter

Field Delimiter to separate the fields in a record. If the user wants to give a delimiter consisting spaces, it should be wrapped in double-quotes. For example, a single-spaced delimiter should be given as " ", although tab could be given as \t

Record Delimiter

The delimiter used to separate the Records, by default it is set to \n.

Output Format

Choose the Format of the message from the options available:

  • XML
  • Text
Note

The following two properties appear only when this property is chosen as "XML".

Info
titleExample

E:\outputExcel\sample1.xlsx

Output Excel File Directory

Provide the path where the excel file has to be created. It is enabled when Output Mode is selected as "New file for each message".

Info
titleExample

E:\outputExcel

Output Excel File Name

Provide the name of the new excel file along with the extension name. It is enabled when Output Mode is selected as "New file for each message".

Info
titleExample

sample1.xlsx

Append TimeStamp

Appends timestamp to the filename. It is enabled when Output Mode is selected as "New file for each message".

Info
titleExample

sample1_20200902151815

Threadpool Configuration

This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective. 

...

Time in milliseconds after which the threads are evicted in case of inactivity. New threads are created in place of evicted threads when new requests are received. Default value is '1000'.

Functional Demonstration

The following flow shows the ExcelWriter taking an input from a CSV file and giving an XML output.

Figure 3: Sample Flow set for the demonstrationConfigure ExcelWriter to take an input message based on the configured field, record delimiters and update or create an excel file based on the selected output mode.

Scenario 1

Configure ExcelReader with the "New file for each message" Output Mode following Figure1 to add data to the sample1.xlsx file.

Image Added
Figure 3: Scenario1 Sample Flow for adding a message in a new Excel sheet and file

Sample Input

Use the following message in the Feeder:

Info
titleInput text

01-03-2020,4,GET /accounts,v3.1,OIDC,Y,6,1,0,Tae
01-04-2020,4,GET /accounts,v3.1,OIDC,N,6,1,0,Ta

Image Added
Figure 4: Input text for Scenario1 in the Feeder window

Output

Image Added
Figure 5: Confirmation message of file creation with the data input

Image Added
Figure 6: Data inserted in Sheet1 in the Sample1 excel file

Scenario 2

Configure ExcelReader in the same manner as in Scenario1 but selectng the Output Mode as "Append" to append data to the sample1.xlsx fle.. 

Image Added
Figure 7: Scenario2 Sample Flow for appending/updating message in the existng Excel file

Image Added
Figure 8: CPS edited wth Append output mode and excel file path

Sample Input

Use the following message in the Feeder:

Info
titleInput text

01-05-2020,4,POST /accounts,v3.1,OIDC,Y,5,1,0,Te
01-06-2020,4,GET /accounts,v3.1,OIDC,Y,8,1,0,Td

Image Added
Figure 9: Input text for Scenario2 in the Feeder window

Output

Image Added
Figure 10: Confirmation message of file updation in the Display window

Image Added
Figure 11: Data appended to Sheet1 in the Sample1 excel file

Adaptavist ThemeBuilder EngineAtlassian Confluence