# 1C Incoming Invoice

Let's consider an example of a Robot that creates an incoming invoice in the 1C program. The source data for this project is the file "Supplier Order". To ensure the robot works correctly, the 1C application must be launched beforehand.

This project demonstrates data loading from PDF or Excel. To see how the work with PDF occurs, you need to connect the "Start Process" block and the left block "Get File Path".

To check the work with loading from an Excel file, you should connect the "Start Process" block and the right block "Get File Path".

The robot project consists of four diagrams and two files: pdf and xlsx. Each file has its own diagram for data loading.

**The main diagram** of the project looks like this (for convenience, the blocks of the diagram are numbered):

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfRuUaxDRdDisSHdfgoUxYfIUU9WgqJxDblhVkC2bf3OmNe9wn4AlrzAoUJ_6L0fJPkzUNgqLVALoRzz4rik0aRpBafFFdhcMGI3Jzw9GYAeflQpppP9xPdRxbv6Ddac5gLMebDqtb-cdNfr1zV4k071qA?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

1. **Block "Start"** (any diagram starts from this block).
2. **Block "Launch Application"** launches the 1C program. The following properties are specified for this block:

* Path to the application (the path to the application being launched or the name of a standard application, e.g., cmd.exe);
* Parameters (command line parameters required to launch the application);
* Wait for launch (pauses the script until the specified application is launched); Wait time (specified in seconds and ignored if the "Wait for launch" property is not selected).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfVpFUeaNW8Gp9ZYwVyL3qYxFkFICKiRMbjSKwYtireAh57QRasTYMfgOLa7bkQyJyDCrpIj6c3_t_Rc8bo_uslQHkvrYFqnw-Zl4sSukSKr_kZtg_nwSy3O3JhPAu3XurDn8_YhdZPvntDStTIWI4Enf4?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

3. **Block "Get File Path"** retrieves the full path to the file with the specified name. The following properties are specified for these blocks:

* Path to the folder (the path to the folder where the required file is located; if this property is empty, the folder where this project is located will be used);
* File name (the name of the file along with its format).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdvb_bo-7_hEsCc9eysT-S4JwU2XFm7D8Z4RHgRgfS46_2_SwZ1Z8f--xLqSMXGoAdkSvih7JKWwFO4gr2UiwC_r3toA0Q2CKUdV5v9KLa9Te4sGaPgiVUQxaAsoqw8iaBeQikthUcxNauMGJjfY06sZFUp?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeSw-8PoKHlz53v-UahlSZ8-xlkusgpOACvlOIeGdbh2EmWw9S7gUucCf9IhsEgRksW_ChlT9XnjiVYMGc6JqiHF9KHxqTCOOy_XI0almc5ZYA7wNQU1gSiqd7jdoE3qpaYmlqNdX7cByd0nJCzvr57Y2UV?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

In this case, two "Get File Path" blocks are used in parallel: one for the pdf file format and the other for the xlsx file format.

4. **Block "Process"** allows creating scenarios consisting of several diagrams. The execution of the scenario will continue from the "Start" block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the "End" block in the external diagram is reached. For the "Process" block, the property "Diagram Name" is specified (the name of the diagram file where the scenario will continue).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXewVCwz9TQFahJkqgaiBsf6CpPcWLqqP66QRiZVMOubPRPL0HlPndl4hseSuIRxMtuWTSuLPSLrd6VYShcoChxkW2FJkDZXq9q26WAcuoXW7OeXmR-d9AR1kMkkbzrLECiVgV_PH1rV2uR4o_IF8TO-Sdsh?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXesoikbsgIihAOsLM8ObWxIAwxH1agH_2xK1mLlg7uJGS4711HGB7PuZKfWr7FuYvcYtmU782G_LSuRDSE5Sjie4u_nFhL13h_czS8_7KsTmlEczdJ8ku79OfreGhsKgP68cIZ0Rba7eZlKswamGLIBa-U-?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

In this case, as above, two "Process" blocks are used in parallel: one for loading data from the pdf file and the other for loading data from the xlsx file.

5. **Block "Process"** located below allows creating another scenario that is common to the two scenarios described above. This process is responsible for adding the invoice in 1C. For the "Process" block, the property "Diagram Name" is also specified (the name of the diagram file where the scenario will continue).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe8TspCJSjR_MtLFNO56t6bVD1MvoHvlmHco6dNnafxBWiOYobf0z7z0065bpPppX2ipVt2b2VsWhDq1exL1ue7UhwjRtDJkVgOdUMXfu__Ynu6OThHgNfH16tI8F7kXVqOxez7HczP70HpO-SNgxaD6Yrz?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

**Diagram "Loading Data from PDF"**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeQnksFiB2Xnzz3IgA-l6ilUya-5i385SrEKJhrMXJg0iu4la8kPI2IyHAnY8rIkC8a3AWBYsc6g6qW9_1XlzK16x-Xi0FRUiAT8XK1I34cdqPL4p78a_1GaAg3cZpmdBDbOn7NgGAjAB_qCBL0Hf59rCwP?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfkaoOiDjZ0pyWdTnixBKovBvKoePVBlfG_YRSRhRudG0EB1gV0FKvk_c0FH6p8tQpHTnCDPOtBZ7UapPE2GEwx-VPQQVaKOnQg0m-aN8dhajZ0z9gW9Emyswl2NQjgxQC0phdB2XA6wiVcSuR62_npAmKj?key=AmI7nHoqQRm-An8sktOWcA)

1. **Block "Start"** (any diagram starts from this block).
2. **Block "Log"** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property "Value" is specified. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs a message about loading the selected file specified by the variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfDI6onnBIHYQNBK3g5ndVy2Bvw4hLFwuP1qS8_HjIrgRK3q5AHqx6B3RZNwwpRnTEIOxpRd3ojnkmmNVl-HNcIWj0CVqpt7MLbUJcobKlVGGMK3SnPRDkg0rIZmovoEbe5MD0mO69Z5AwqPdvT_-27iDeL?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

3. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, two expressions are used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcWIu8B4ZwR-tKLv-ai3Y7oAN4Dq2br3y_YVQM0gaj4YMDM4IEb-_dEoLi1l3lwoUuMzsEK57y7HfTS_f-Z0R2OzVjjxFnU73O08lI4ySl5zEx4aSA7kL5vN1OgyFyeb-biyex89EnyyKvp7HvGwriiYL-6?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

4. **Block "Extract Table"** allows extracting the specified table from the pdf file. The following properties are specified for this block:

* File name;
* Page number (the page number from which the text will be extracted from the table);
* Table number on the page (the number of the table on the page from which the text needs to be extracted).<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfw9PtDoCtSOf2BkuqjRmPZCh9FpYtbdHetJD4PR9p15PiR4xJQ2WVZJxAuTTHRugqjlDN0tVyiQvXdN4OucIEzOhB7hufKIuvGglWm7r77Fj7reK9ZsYwhx07kXRPlHh2PZ7rpkRcVxCqWMqRDdJCZy4VE?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

5. **Block "For Each Loop"** iterates through all rows of the data table.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfrNWT_m5eIhe6A87X2gOjiysz2xJ5Ij-Tb-RHE9ldkzcC-id-sOqUeOQamJyTh6agHu01F9mWMuRArD5miMDMIfozLifN_WcN-1lQtwETNQqdBlliuhvBj0cokZfBWEzU_Ebz7ysGZMvUesq9iPAyjv4k?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

5. **Block "Get Text from Page"** allows reading text from the specified page of the pdf file. The following properties are specified for this block:

* File name;
* Page number (the page number from which the text will be extracted);
* Result (returns the extracted text from the page).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf8qVX9uwNvzTgVcNNFDfhaZSjfQdUKfxzZkqIRbiPEKVpmdS7Bs0TzQ7wz6IIk5js8a3wIeWXTczLCJG9wqNAeGr237va3eOGJSQFuxapopxRd0rA9VHa6ndz8At0mc0Z2FspRxfJQYk-4D6fN38TXPblD?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

7. **Block "Find Substring Between Two Substrings"** allows finding a substring in the text that is located between two other substrings. There should be as many of these blocks as there are substrings to find. In this case, two "Find Substring Between Two Substrings" blocks are used: for the substring "Executor" and the substring "Order". The properties of the blocks are specified as follows:

* Text (input string);
* Left part (left search substring);
* Right part (right search substring).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcZpjCwWcnmgU211YbgbAe5dK-dm-6ZozrVbmV5AeDf8WJDxAjh6QhCICQ2xwYCejof9ysbXfnWUsaZWm_mq2wiAjUHu9WbMi_wp7BKmKb5l4sbj1XrxwM3Zvpjt2RB0cFgZYKu0NGkRlsuJWt0ecYNEF4?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc7GqMV7ebqvR8UbYh0eC7Tn-hVoHSCKqBDxhzJ3VjUSksf2k_VT3_NUZtGTx6D_zF2Cpy6nK7_np3_zfcIByjFtDm2Egp5wyoZtQJBmDL7nnssUs1Tsb1QpZhFEn60zeOLoj4HecIAR1PsesxCiNSblKk?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

8. **Block "Condition"** checks the specified condition for truth, after which the execution of the scenario continues towards the "Yes" output (if the condition is met) or towards the "No" output (if the condition is not met).

The condition is written in the format: "variable" equals (==)/ greater than (>)/ less than (<) "value".

For example: $a == "Hello", that is, if the value of the variable $a is equal to "Hello", then the output is "Yes", otherwise the output is "No".

$Result > 5, that is, if the value of the variable $Result is less than 5, then the output is "Yes", otherwise the output is "No".

In this case, the condition is set as: $Row\[0] == $index, that is, if the value of cell 0 is equal to the variable $index, then the output is "Yes", otherwise the output is "No".

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXequltaOe8VZlqkmgkMuH1JjBfRd6krz36JXW51JiXMeQ4jc6u4-TVdcxQrDfmDYjRxn8FUUCa8AmYm3tw-HpEQK1ViptlknwVcbEPScPZGyDNwjkTB6OQOMxjzIcPS2z55zkMN3lJeAA795tPyjEhBQkQI?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

9. **Block "Add Row"** allows adding a row to the data table. In this case, the following properties are specified:

* Table (the data table to which the row is added);
* Row number (returns the number of the added row, numbering starts from 0).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcBl5iY6eXWcUbUoParysO8qGCsAZwMTtdryW6NwSNFQp9SYUPcs0sFVMXaaWFGLIHRYi2TvcnAHgf7A0cKI0U1Y6gF8r5hThy-mGXD-0xd3QP-Ipp9HANDhoK_QIJgaLHKH7lYZGdJm3C2-ff5ZX-tiLw?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

10. **Block "Write Value to Cell"** allows writing a value to a cell in the data table. In this case, three such blocks are used for different variables: $Row\[2], $Row\[3] and $Row\[5].

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfDrH_WXvfCXTKe11UT29pGKJFwJcKLioed2vM2iBJNDKDI0lKqe1cs0_BAu1GPNi3fkurZGmUDJDJ9gWvCkjtzsTb3LFOJCEeMpNNB-83CaJ0WFotOCvtwN3FbyfkSrxqyyUuPEW44zE9Qu9FRWraPwUY?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf_2Txr5HdDENIARh2Ny58mjtePkIBuXXH5UorkSjVS3ugLzUCLRuhPMB6-C9VjY3TLITjP5bsE31VHA2pcyVJX5H_uhEx9n-ojoNhxcZaJOSBVuIoBQJPyF_nFZ3AZe92BpmsOc8imOXqzZeEzRtehexQK?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc52N7acGlE90pWhKFECVM7obah9GUXuDz39aMo8nnschfPTTJD0Ji0RtDoQB1W-V-KkfV9Oyhb4UmcylQAyCTMSc0rbXPdgXdmsIe9t6p8aiVKZ9wMgYq9Xo_9K50bid7gm2cuqy0Xgrtum7Vv5Y4BMyFT?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

11. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfZiNAyIML6b8IjXkDjUb9n5-Ox85CsyzwfL0QTpO7wp_zK6idOEyosEhYZgAtIWzENP4h6P-r6_5KH-q-4_LWVz2bYzxK6_mUFcPkP4rU2cd2_2e5Zz913gf_zvAX0GVbN_jIGBpCB24S4_F2UwY8bkaGa?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

12. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, two expressions are used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfXeClTmGJBo1xztuOMQ-y2XxP3f84SV4Uu4PiYjesqykTWcewTuHWI-GyWY_SQm1P8hfG5-opTKIsFNxxam06Sxnrohib6XnKYwOc8LfsPDEj4r-sskyGwFqC7eeF4bgWvJMVKdcHcjfwBvZg3wGWGNJzKeg?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

13. **Block "End"** (this block completes the execution of the scenario or returns the subprocess diagram to the main process).

Diagram "Loading Data from XLSX"

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdohXtRjpKtoBbc74ngbGmNyu3px0T9l6N9pZTUhM10xW2TWRAnm1s54ddHiMUAz4C8Cmiw5Esy8P8Izku8i9_6SpqQmqn1i6lvGIWl0k5YIRPVfCK72ynZWqFnK5n-rufd2L96vH7uSzb34QjXQuhRQz8g?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdHrH25UBlyc0w0FX0g6O8FZNX--o7McX_9FgEsIRiLmrpo24H95OvkUn7BQ_B_5uO1gIpZt-TAr8lu2SJsBdbqRC3POdkwxqSjD9RGr2Pzu34zuwFTmyGdX0sO9QojFtBtCmjWALYdIZqMaFf2P08ts_Uu?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

1. **Block "Start"** (any diagram starts from this block).
2. **Block "Log"** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property "Value" is specified. A text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs a message about loading the selected file specified by the variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfggmj4jMbO5FfkYcOfjGoGtdUtbhl-lvwjQTeCPlhT6JvWXxNGSNt7LzzMyYS5T3xcKE03RKtGK8CDTadKs55zcwFp-Y5fNtoi7iSbZdn0CJiiTpddAwTjVy-Z0b6AYc5pQQs2L5IQsK-6RINhNEYh9H8R?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

3. **Block "Open Document"** allows opening an Excel document. The following properties are specified for this block:

* Path to the file (the path to the Excel document that needs to be opened);
* Link to Excel (returns a link to the process of handling the Excel document);
* Link to document (returns a link to the opened Excel document currently being worked on).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfyyZSjSQ3l6KPemc6BoktmIwSi8oNhHKWLJP9zLZ4cl5camfpwbSrDMwJXSJu3rsZTluZVG_xzzY4QWO-E7W39iuvRDQ-2VGOLBGkweiGyT2cSdSTW1oQZA1XNOsWD1A9rjM7QW1UiHTQ0cDrgHemtw4I?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

4. **Block "Get Cell Value"** allows reading a value from a cell in the Excel document. In this case, two "Get Cell Value" blocks are used for different rows and columns. The following properties are specified for this block:

* Link to document (returns a link to the opened Excel document currently being worked on);
* Sheet (the ordinal number or name of the sheet where the required cell is located);
* Row (the row number where the required cell is located);
* Column (the column number where the required cell is located);
* Result (returns the content of the cell of the same data type as in the Excel document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfFlFDvuPBWgSwsAQwLK-BWI4yvoPOgY3RoeeltsO4LeduQYJZRSXLYQ1Vo5ZSqjT1iM0CLKQedq2uT33IAVYfZEGR0_nbP5BgzWi7vUKPmst47YoKfbvlzo5ISdQ9qZxTSyB9cNBfqCrxRlf4Uc0eDUQCl?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfExO_doZQrNcWXKEksbJlADAWBzvvOo1ic96fqjxzKjLyh3Px8Py0_V82NbClITF-YQTH2SAtp7zQh5ISuVlOmIjxDQlJ3kW_HFKLNdM3EqoQqyOLZ7amSjep-Nn7HVICAuBT6-oFdmYQPTMJ36M4f7tIa?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

5. **Block "Find Substring Between Two Substrings"** allows finding a substring in the text that is located between two other substrings. There should be as many of these blocks as there are substrings to find. In this case, two "Find Substring Between Two Substrings" blocks are used: for the substring "Executor" and the substring "Order". The properties of the blocks are specified as follows:

* Text (input string);
* Left part (left search substring);
* Right part (right search substring).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdMUooE7iMdKalA6NN4cdv1lSEiwX4RpOH1htZ7CN21Ki4LKYFRl-HVF1RGNCOxMyrC3fQa0FY7jr_5A22ZNlWPsuBBucUbSWwLIBQM7jRUNPKwrIccLoEC0OhIILfAyQdpgoxP4lmP8bJe2GutdaxKFmcu?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

6. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf-esMaUiOm6TOyWVZWfu5k1G5TVpxztR03yptV4JsRUPnJQUexhyZyp9XpOLgjOdT7sem5NmCnKnzxYsJk4UqygiFG-Zxec-9Cnnc8ySqcIWZ3dOxBB9n1ol0PrssWwQbnHZ0L1DkhM5lmnRAI_A_T-7tI?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

7. **Block "Get Cell Value"** allows reading a value from a cell in the Excel document. The following properties are specified for this block:

* Link to document (returns a link to the opened Excel document currently being worked on);
* Sheet (the ordinal number or name of the sheet where the required cell is located);
* Row (the row number where the required cell is located);
* Column (the column number where the required cell is located);
* Result (returns the content of the cell of the same data type as in the Excel document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXch_YEs2dfFWsPdzmF_KbUvYc5DXnVYq2YZ-2Qg7AmgLsK7TYKh6hdA-5m6Wt2XaqCwOdbK0TgtLfit1f55f1jp36tdUKCbhvKNGKLw0lX7L5-YKGpam9uM4FoD1RVSh-UG41dzTN6Qs7oaKKBEK2RnDrzL?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

8. **Block "Condition"** checks the specified condition for truth, after which the execution of the scenario continues towards the "Yes" output (if the condition is met) or towards the "No" output (if the condition is not met).

The condition is written in the format: "variable" equals (==)/ greater than (>)/ less than (<) "value".

For example: $a == "Hello", that is, if the value of the variable $a is equal to "Hello", then the output is "Yes", otherwise the output is "No".

$Result > 5, that is, if the value of the variable $Result is less than 5, then the output is "Yes", otherwise the output is "No".

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeayu-5i9yGVmnDtXEakJzvpnYH4oBQVCF8xKGRD9yZvNtd7f7ydLi-8N5qj7LHYaDfhgCvYULGo2_JeFDnxnw1Enn6MR74gfhYTVSQh7GIvwelOFWE5nFQiPyOsb0m-v5fA-CBrKpNbq940v778uigB9t5?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

9. **Block "Close Document"** allows closing the Excel document. The following properties are specified for this block:

* Link to Excel (returns a link to the process of handling the Excel document);
* Link to document (returns a link to the opened Excel document currently being worked on).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe_UTU7rY1QL0_fBSbD7K9Ak2mHAjaQrnLEowTCIrlzCx4r2gomWb-bihMUhX86pyqv0SDMxcfaBCOb_AOoGEH-DX9TOliIKvB4kGGcelvdY7M7G6nKzwgkSVT49AX671BaGHtAse2oTeYrpWXadToqY5AX?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

10. **Blocks "Get Cell Value"** allow reading a value from a cell in the Excel document. In this case, two "Get Cell Value" blocks are used for different rows and columns. The following properties are specified for this block:

* Link to document (returns a link to the opened Excel document currently being worked on);
* Sheet (the ordinal number or name of the sheet where the required cell is located);
* Row (the row number where the required cell is located);
* Column (the column number where the required cell is located);
* Result (returns the content of the cell of the same data type as in the Excel document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc50JOZDttMgpgFfFxBPKvKUrQcyQch6et-dpGlzYDjGcaBZFtNHr5LWheQOYFhfwASAUgoB-xbJizTgtnmyoDEaI_bGPf5iBY3QY9DeOO5GEgE82eHWmQpflynYx9THY0M3fvzEw6QPHqWnKHspkfxYa5w?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcPLIz7Ezm_Aw-w_eCtYlkUlOji0Lh4651iMfLf3WxOV4KlzJlHkV8ot3IE1cgeXq5jqCzCFl2fq_I8dOn6AQdhuOdKsZMhaX7Ejbnnr1G7mVO7kdmwAz1CX66WYM5xFVwiwm4M_EqdV2OcswwZq0e1wPZR?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfY5AsyqLgV0wawslXvHtDi4KCyUCP-Akl9vQWvQbk7I3O_VBRzWKV-EHlY1CyliaecBxKCPmYNGKb8td6ltKMMp3bPwvyNlC89hG_8JUSTRR0N18zbQh7QvZ8-u9zy7vi2zE2zkQpgR8mxXtcixOszx-Br?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

13. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdXM0DXMuMucAxZYiluq820iyeIOFxz_xFYXbWwHMLGmROuVlXPdso_hduI55XK62w8lzeRBL1ctA5lO_PTU1he8wrzKhGKa-xL8ppqFLYmHq9uo8RMTr85wiO6R6ZZz2taD9bWOB-EpKr8N71OoOiksP0q?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

14. **Block "End"** (this block completes the execution of the scenario or returns the subprocess diagram to the main process).

**Diagram "Adding Invoice"**

After extracting data from the PDF or Excel document, the robot creates an incoming invoice in 1C. This diagram was partially created using the "Record" function of Sherpa Designer. More details about it can be found [here](https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/rabota-v-sherpa-designer/osnovnoe-menyu/panel-razrabotka/menyu-zapis/zapis-deistvii-polzovatelya).<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXek15vPpqa9UbCU-EBCErxQP0bgXHKMxTDa8oS0ykg45LWnltd3-zRzSAEzo-tLop8T44wUCW8Xm5adGRFmgp-PKyCiFD3XTxoJarEyUFCv3FhDL7xaHtZG_vwjR83Gz4XzZmXjl4NNOYu9qvJH7fLORrg4?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdGy5Cn2_lpkFhP5RHj34sX-AZZtFJvi5WceULPN0ckVmR2Mt6bkp5lc2s8OCHHURBjfZQbglrn-ZXZKwt8NdLhj8weTqQPlAlwCtIamTl-LRjW05RgzfAW5U18kZCQhbGhZDjfW_piAbMaYi1V-_6XgmTO?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

1. **Block "Start"** (any diagram starts from this block).
2. **Block "Log"** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property "Value" is specified. Here, this block logs a message "Creating nomenclature".

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXffFQedeULJNhTkhBeyGWyrJ4a-_Ri1vxqFTGJ8A324vzb3PT0sYeve0lv2fL83MVGUPwKkxLV7RHZk4JnduNWIUMov2b4mIuvkaJIgLwlVje1IEHPkYhL8EZFOn_4G2zhzK46-mxfpHer1Gt_5xF-P0QKL?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

3. **Blocks "Check Element Presence"** (checks for the presence of a specified user interface element on the screen), **"Click Mouse"** (performs a click on the specified application element), and **"Press Keys"** (emulates key presses on the keyboard) are added to the diagram using the "Record" function. Each of the blocks uses a selector. More details on working with selectors can be found [here](https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/rabota-v-sherpa-designer/paneli-svoistv-i-peremennykh-i-rabota-s-nimi/panel-svoistv/nastroika-selektorov).
4. **Block "Assign Value to Variable"** sets new values for one or more variables. In this case, the properties specify one value that needs to be assigned to a specific variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdLmHA539yA604y6xXWqQMHBoN1NuQKXgD__xzdbz19XW68a3NQcGG-u4Kru-sbM6KWSIqNaVMAhuRaNgEHW-GEq66C9q-Mym13bAhuV6Iy05s1LrKg0SgTZNAWlXtKFrR8Af13-z2mbYaeAMZHDKcEgmgI?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

5. **Block "For Each Loop"** iterates through all rows of the data table.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeytt-dsnGWRT07ZPdFS4bGD0_3N1ifmizn471LbxQbYUY-_aj9d5vsVgr_N8Epen7XbEFFuwQqq3QW6zYhiZ3pJzmhZh1aYAJ-i_7jaJY2J7FJQAd3tUKP6cLpbKTRGYpGvf9YUsSjIBek83jNb_N7z-I6?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

6. **Block "Click Mouse"** (performs a click on the specified application element) is added to the diagram using the "Record" function.
7. **Block "Pause"** pauses the execution of the scenario for a specified time. The following properties are specified for this block:

* Unit of measurement (the unit of measurement in which the duration of the pause is specified);
* Duration (the number of seconds for which the scenario execution will be paused);
* Start immediately (the set flag enables the application of the delay immediately on the first pass of this block from the moment the robot scenario is launched).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc8VLMRXBHKsWrlNsn27mr8xVu5X4b8pNauRtbkg2ICr0JKHB9KKgRoWbQKr8xXyWqUl0Se1nwvdOSdwoSgnNJo8EJdUTAdZuhZWkDyyN7KlrRtl9Vv-4tifKAYzKoHFLSTvWGAIB42O2HBK-nzGIraIZD-?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

8. **Blocks "Click Mouse"** (performs a click on the specified application element) and **"Press Keys"** (emulates key presses on the keyboard) are added to the diagram using the "Record" function. Each of the blocks uses a selector.
9. **Block "Execute Expression"** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfINt0-_aS5EZpceAcisv-VhaByz6kXMWbyt4G-74ORfHaHu8KgYa880g0Hth_c09f0Eszc6yw4TRXlLSy3zewLPorLmyhXidZCdtiuOT-13ejc4FByMryUeP6nfLG5q5J7fn0zrJsWHc-KKo7VL_lUtDFc?key=AmI7nHoqQRm-An8sktOWcA" alt=""><figcaption></figcaption></figure>

10. **Block "End"** (this block completes the execution of the scenario or returns the subprocess diagram to the main process).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/primery-robotov/1s-prikhodnaya-nakladnaya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
