User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:user_guide:worksheet_lists [2020/06/12 17:20]
tiger [Referring to the current row in a row list]
en:user_guide:worksheet_lists [2021/01/10 14:44] (current)
tiger [Know your process for one worksheet; then switch to multiple]
Line 1: Line 1:
 {{indexmenu_n>7}} {{indexmenu_n>7}}
-====== Working with many worksheets ======+====== Working With Many Worksheets ======
  
 Naming and using a worksheet is a very useful concept in case of a few, known worksheets. There are cases, though, when several or many worksheets with the same structure must be batch processed or created. Typical cases are consolidation or splitting tasks. Naming and using a worksheet is a very useful concept in case of a few, known worksheets. There are cases, though, when several or many worksheets with the same structure must be batch processed or created. Typical cases are consolidation or splitting tasks.
Line 7: Line 7:
 ===== Consolidating data from multiple source worksheets to a single target worksheet ===== ===== Consolidating data from multiple source worksheets to a single target worksheet =====
  
-The source worksheets that should be consolidated do already exist having their filenames at hand. Therefore best practice is to use the **WBook List Start** and **WBook List Next** process steps (under categories Worksheet and If / Lists on the [[en:user_interface:toolbar|ProcessToolbar]]) to perform the same operations on multiple source worksheets. +The source worksheets that should be consolidated do already exist having their filenames at hand. Therefore best practice is to use the **[[en:process_steps:wbooklist|WBook List Start]]** and **WBook List Next** process steps (under categories Worksheet and If / Lists on the [[en:user_interface:toolbar|ProcessToolbar]]) to perform the same operations on multiple source worksheets. 
  
 Under the workbook list parameter the workbooks of the source worksheets can be specified using: Under the workbook list parameter the workbooks of the source worksheets can be specified using:
   * wildcard characters ? and * in filenames (e.g. c:\my\folder\*.xlsx for all files in my\folder); and   * wildcard characters ? and * in filenames (e.g. c:\my\folder\*.xlsx for all files in my\folder); and
   * multiple folders or files separated by ; (e.g. c:\2018\report.xlsx;c:\2019\report.xlsx)    * multiple folders or files separated by ; (e.g. c:\2018\report.xlsx;c:\2019\report.xlsx) 
- 
- 
  
 ==== Know your process for one worksheet; then switch to multiple ==== ==== Know your process for one worksheet; then switch to multiple ====
  
-The first step is to specify the process for one source worksheet just like it is done for a single worksheet case. Use **WSheet Use** to specify the only source worksheet and another **WSheet Use** for the target consolidation worksheet. Once the process is up and running follow these steps: +The first step is to specify the process for one source worksheet just like it is done for a single worksheet case. Use **[[en:process_steps:worksheet:wsheet_use|WSheet Use]]** to specify the target consolidation worksheet and another **WSheet Use** for the only source worksheet. Once the process is up and running follow these steps: 
-  - replace **WSheet Use** for the only source worksheet by **WBook List Start** for all the worksheets at the beginning (NB: keep **WSheet Use** for the target!);+  - replace **WSheet Use** for the only source worksheet by **WBook List Start** for all the worksheets at the beginning of the process (NB: keep **WSheet Use** for the target!);
   - specify all the worksheets in the Workbook list parameter   - specify all the worksheets in the Workbook list parameter
   - add **WBook List Next** to the end of the operations;   - add **WBook List Next** to the end of the operations;
-  - use the [[en:concepts:djeeniname|Djeeni name]] of **WBook List Start** as the source worksheet reference in all operations instead of the Djeeni name of **WSheet Use** for the only source worksheet+  - use the [[en:concepts:djeeniname|Djeeni name]] of **WBook List Start** as the source worksheet reference in all process steps instead of the Djeeni name of **WSheet Use** for the only source worksheet
   - replace the target cell of cell and range operations to allow for    - replace the target cell of cell and range operations to allow for 
     * appending rows;      * appending rows; 
     * inserting rows; and     * inserting rows; and
-    * accumulating values instead of overwriting the same cell again and again. See detailed at the below sections.+    * accumulating values instead of overwriting the same cell again and again. See these steps detailed at the sections on this page below.
  
 Done! Done!
Line 83: Line 81:
   Cell Set    Cell: wsTarget!C5    'number of values   Cell Set    Cell: wsTarget!C5    'number of values
               Value: 1               Value: 1
-  Cell Set    Cell: wsTarget!C4    'average of hte only cell+  Cell Set    Cell: wsTarget!C4    'average of the only cell
               Value: [=wsSource!D5]               Value: [=wsSource!D5]
    
Line 103: Line 101:
  
  
-===== Dividing data from a source worksheet to multiple target worksheets =====+===== Split data from a source worksheet to multiple target worksheets =====
  
 A typical task is to split an MS Excel source worksheet from an external source (it can be e.g. a supplier provided data set or an IT system report) according to certain criteria. The question is, how it is decided which target worksheets should be created? They do not exist before the process so the filenames are not known. Further, the set of the to be created files can be different every time based on source or supplementary info. Djeeni can create target worksheets in three ways: A typical task is to split an MS Excel source worksheet from an external source (it can be e.g. a supplier provided data set or an IT system report) according to certain criteria. The question is, how it is decided which target worksheets should be created? They do not exist before the process so the filenames are not known. Further, the set of the to be created files can be different every time based on source or supplementary info. Djeeni can create target worksheets in three ways:
Line 110: Line 108:
   - If the target worksheets are to be created using the information from the source worksheet itself then the **WSheet Split** process step can be used   - If the target worksheets are to be created using the information from the source worksheet itself then the **WSheet Split** process step can be used
  
 +Let's see these ways in details.
 ==== Creating target worksheets in a WBook List ==== ==== Creating target worksheets in a WBook List ====
  
Line 233: Line 232:
 Row List Start Djeeni name: rlInner Row List Start Djeeni name: rlInner
                Worksheet: wsInner                Worksheet: wsInner
-Cell Set      Cell: weOuter!D[#|rlOuter]  'current row of the rlOuter row list +Cell Set       Cell: wsOuter!D[#|rlOuter]  'current row of the rlOuter row list 
-Cell Set      Cell: wsInner!D#   'the nearest (innermost) row list+Cell Set       Cell: wsInner!D#   'the nearest (innermost) row list
 </code> </code>