Alu.cardRPA → readable documentation
← Gallery
UiPathPublic sampleUiPath Studio 21.8.0.0

Summarize all comments and notes in Excel

UiPath-Services/RTG/Summarize-all-comments-and-notes-in-ExcelSummarize all comments and notes in Excel.zip

  • Calls into other assets16
  • Decisions42
  • Loops10
  • Error handling19
  • Other steps228
assets
14
steps
315
notes
52
source
26k
ExcelWeb browserScripting / custom code
SessionRestored from cache — 0 tokens spent
in
42k
out
27k
from cache
63k
cost
$0.95
  1. Read the project files

    Parsed Summarize all comments and notes in Excel (UiPath).

    • 14 assets — Main.xaml, Continue_Workflows/Process.xaml, Framework_Workflows/CheckAndGetConfig.xaml, Framework_Workflows/DisplayResultFormError.xaml, +10 more
    • 315 steps, 42 decision points, 10 loops, 19 error-handling steps
    • 52 steps carry the original developer's notes
    • Systems: Excel, Web browser, Scripting / custom code

    Reading a 26.2k-token digest — 14 assets in full detail.

  2. Work out what the process actually does

    60.6s5.2k out
    Purpose
    Produces a consolidated summary of every cell comment and note buried inside one or many Excel workbooks. For each selected workbook the bot makes a dated copy, runs a VBA macro that extracts all comments and notes into the copy, and leaves the result in an output folder so the user never edits the original.
    Trigger
    Manual, attended launch by a user from UiPath Assistant. The user is shown an input form to choose a single Excel file or a folder of Excel files, then presses a button that runs the process. Three Assistant switches control the experience: Hide_Inputs (skip the input form and reuse the last run's selections), Hide_Messages (suppress the floating status window) and Hide_Results (suppress the final results form).
    Frequency
    Not determinable from source — on demand, whenever a user needs comments extracted.
    Systems
    1. Microsoft Excel (desktop, Office 16.0)
      Role: Opens each copied workbook and runs the VBA macro 'ExtractNotesAndComments' from Continue_Workflows\Extract Comments and Notes.vb to harvest cell comments/notes into the copy.
    2. Windows file system
      Role: Enumerates .xlsx/.xls/.xlsm files in the chosen folder, copies each source workbook to the output folder under a new name, deletes failed copies, and opens File Explorer at the output folder for the 'View output' button.
    3. Windows registry (HKCU\Software\Microsoft\Office\16.0\Excel\Security, value AccessVBOM)
      Role: Set to 1 before processing to allow programmatic access to the Excel VBA project ('Trust access to the VBA project object model'), and back to 0 afterwards.
    4. Local configuration store — MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json
      Role: Reads last-run settings at start; overwrites the file at the end so the next run is pre-populated.
    5. UiPath Orchestrator assets
      Role: Optional: any asset names listed in Data\Supporting\AssetConfig.json are fetched and merged into the run configuration; failures are logged as warnings only.
    6. Default web browser
      Role: Opens the user-guide URL held in config key 'userGuideUrl' when the user presses 'View user guide' on the input form.
    7. Default email client
      Role: On error, opens a pre-filled mailto: draft to the address in config key 'errorEmailRecipient' with the business process name plus error type as subject and the error message as body.
    8. UiPath Assistant window
      Role: Minimised at the start of the run so the forms are visible.
    Inputs
    • User choice of mode via config key 'selectType': 'singleExcelFile' or (else) whole-folder mode
    • Single workbook path — config key 'selectFile'
    • Folder path containing workbooks — config key 'excelFolder' (only .xlsx, .xls, .xlsm are taken; anything else is logged as 'excluded')
    • Output folder path — config key 'outputFolderPath'
    • Assistant arguments Hide_Inputs, Hide_Messages, Hide_Results
    • Project-supplied defaults: Data\Supporting\Config.json (maintained via the ConfigUtility form) and Data\Supporting\AssetConfig.json
    • Persisted previous-run settings: MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json
    • Macro source file Continue_Workflows\Extract Comments and Notes.vb, entry point ExtractNotesAndComments
    • Configured message texts: 'NoExcelFiles', 'NoVBAAccess', 'userGuideUrl', 'errorEmailRecipient'
    Outputs
    • One processed workbook per input file in the output folder, named '<original name> - Notes and Comments MM.dd<original extension>' containing the extracted comments and notes
    • On-screen results form showing 'Your automation has completed!' plus 'Total Excel workbooks: N' and 'Successfully processed: M'
    • A per-file results table (config key 'resultGrid') with one row per workbook: file name and either 'Successfully processed' or the error message
    • Updated Run Config.json in MyDocuments capturing the selections made this run (and firstRun flipped to False)
    • Exception screenshot PNG named ExceptionScreenshot_yyMMdd.hhmmss.png in the folder from config key 'exScreenshotsFolderPath'
    • Execution log messages (Trace/Info/Warn/Error/Fatal), including business- and system-exception entries
    Stages
    1. 1. Load configuration
      Summary: Read project name and version from project.json. Check for MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json; if present, load it as the run settings, otherwise create the folder structure and build settings from Data\Supporting\Config.json. If the stored project version differs from the current one, mark this as a first run (which forces the input form to show even when Hide_Inputs is checked). Blank userGuideUrl becomes 'No user guide link available'. Then merge any Orchestrator assets listed in AssetConfig.json. Any failure here is treated as a system exception and ends the run.
      Assets: Main.xaml, Framework_Workflows/InitAllSettings.xaml, Framework_Workflows/CheckAndGetConfig.xaml
    2. 2. Start the status window
      Summary: In parallel with the main process, unless Hide_Messages is checked, display a small always-on progress window that listens on a named message channel (config key 'statusWindowChannel') and shows whatever text the process broadcasts. If the user closes it manually, message handling stops. The message 'EndProcess' closes it.
      Assets: Main.xaml, Framework_Workflows/ShowStatusWindow.xaml
    3. 3. Collect the user's selections
      Summary: Minimise UiPath Assistant, then show the input form pre-filled from the saved settings, where the user picks single-file vs folder mode, the file/folder, and the output folder. Buttons available include Cancel, 'view user guide' (opens userGuideUrl in the browser) and a submit button that runs the process. If Hide_Inputs is checked and this is not the first run of this version, the form is skipped and the previous run's selections plus last-pressed button are reused. Closing the form with 'X' or pressing Cancel sets a cancelled flag and ends the run.
      Assets: Main.xaml, DisplayInputForm.xaml, FormButtonAction.xaml
    4. 4. Build the workbook list
      Summary: Broadcast 'Process started'. If selectType = 'singleExcelFile', add the one file from 'selectFile' to the work list and post 'Aggregating comments and notes for a single file'. Otherwise list every file in 'excelFolder', keep only names containing .xlsx/.xls/.xlsm, log the rest as excluded, and post 'Aggregating comments and notes for multiple files'. Note: the outline's flow ordering is ambiguous about the exact sequence of the registry toggles relative to the file-gathering branches; only the single-file branch clearly shows the empty-list check and the enable-macros step.
      Assets: Continue_Workflows/Process.xaml, Continue_Workflows/GetSingleExcelFile.xaml, Continue_Workflows/GetMultipleExelFiles.xaml
    5. 5. Enable programmatic access to Excel VBA
      Summary: Run a command-line registry write setting AccessVBOM to 1 under HKCU\Software\Microsoft\Office\16.0\Excel\Security so the macro can be injected. Developer note: 'If UiPath doesn't have admin rights this step may fail and the user will need to enable this manually (a one-time process) in Excel.'
      Assets: Continue_Workflows/Process.xaml
    6. 6. Copy and process each workbook
      Summary: For each file in the list: build the target path '<outputFolderPath>\<file name> - Notes and Comments <MM.dd><ext>', copy the source workbook there (overwriting), broadcast 'Processing Excel workbook #n — Please wait...', open the copy in Excel without auto-save, run the VBA macro ExtractNotesAndComments against it, broadcast 'Finished Excel workbook #n', increment the success counter and add a 'Successfully processed' row to the results table. Originals are never modified.
      Assets: Continue_Workflows/CreateLinks.xaml
    7. 7. Compile results
      Summary: Turn the per-file results table into the 'resultGrid' shown on the results form, append 'Total Excel workbooks: N' and 'Successfully processed: M' to the result message, set the message to 'Your automation has completed!' as its base, and enable the 'View output' button so the user can open the output folder.
      Assets: Continue_Workflows/CreateLinks.xaml, Continue_Workflows/Process.xaml
    8. 8. Disable programmatic access to Excel VBA
      Summary: Reset the AccessVBOM registry value to 0, returning the machine's Excel macro-trust setting to its locked-down state.
      Assets: Continue_Workflows/Process.xaml
    9. 9. Show results and offer a repeat
      Summary: Broadcast 'Process complete'. Unless Hide_Results is checked, show the results form with the summary message, the per-file grid, a 'View output' button that opens File Explorer at outputFolderPath, and a 'Repeat process' button. If the user chooses to repeat, exceptions and flags are reset and the input form is shown again; otherwise the run ends.
      Assets: Main.xaml, Framework_Workflows/DisplayResultFormSuccess.xaml
    10. 10. Persist settings and close down
      Summary: Write the current settings back to MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json (setting firstRun to False on the first run of a version) so the next run is pre-populated and can skip the form, then broadcast 'EndProcess' to close the status window.
      Assets: Main.xaml
    Exceptions
    1. Configuration cannot be loaded or built at start-up
      Handling: Logged at Fatal level; an empty settings dictionary is created if needed so the error form can still render; the error results form is shown; if the user does not press 'Repeat process', a system exception 'Init Error - ...' is re-thrown and the run ends. The developer note states the user cannot resolve this themselves.
    2. No Excel workbooks found for the selection
      Handling: Raise a business exception using the configured message in key 'NoExcelFiles', which surfaces on the error results form.
    3. Excel refuses programmatic access to the VBA project (error message contains 'Visual Basic Project')
      Handling: Converted into a business exception using the configured message in key 'NoVBAAccess', i.e. the user must enable 'Trust access to the VBA project object model' in Excel manually — see the user guide.
    4. A single workbook fails during copy or macro execution
      Handling: The partially created copy at the new file path is deleted, the failure is logged, and a row with the file name and the error message is added to the results table. The loop continues with the next workbook — one bad file does not stop the batch.
    5. Any other business-rule failure during form completion or processing
      Handling: Captured as a business exception (also detected by the text 'Business Exception' in a generic error), logged at Error level with business-process log fields, and shown on the error results form with 'Processing Error - ...' re-thrown unless the user repeats.
    6. Any other technical failure
      Handling: Captured as a system exception, logged at Error level, a full-screen screenshot is saved to the folder in 'exScreenshotsFolderPath' (screenshot failure itself only logs a Warning), and the error results form is shown; 'Processing Error - ...' is re-thrown unless the user repeats.
    7. User wants to report an error
      Handling: The error results form offers a button that opens the default mail client with a draft addressed to config key 'errorEmailRecipient', subject '<business process name> <error type>', body = the error message with line breaks encoded.
    8. User cancels the input form or closes it with 'X'
      Handling: A cancelled flag is set, a trace message 'Ending process from Form cancellation' is logged, and the run ends without processing.
    9. User-guide link cannot be opened
      Handling: Falls back to broadcasting the URL text into the status window so the user can copy it.
    10. An Orchestrator asset named in AssetConfig.json cannot be retrieved
      Handling: Logged as a Warning ('Loading asset X failed: ...') and the run continues without it.
    11. Status window not yet rendered when the process starts (e.g. input form was hidden)
      Handling: The 'Process started' broadcast is retried once with a 3-second timeout, per the developer note.
    Unknowns
    • What the ExtractNotesAndComments VBA macro actually writes — target sheet name, layout, and whether comments are consolidated onto a new sheet or listed per source sheet — is not visible; only the .vb file path and entry-point name are given.
    • Where 'outputFolderPath', 'selectFile' and 'excelFolder' default to; the actual default values live in Data\Supporting\Config.json, which is not shown.
    • The literal wording of the configured messages 'NoExcelFiles' and 'NoVBAAccess'.
    • The support email address in 'errorEmailRecipient' and the user-guide URL in 'userGuideUrl'.
    • Typical run volumes (how many workbooks per run) and expected runtime.
    • Who owns the output folder, who consumes the extracted-comment workbooks, and any downstream process or retention rules.
    • Whether this is ever run unattended/scheduled; the outline only shows attended launch from UiPath Assistant.
    • Full inventory of input-form buttons — only Cancel, 'view user guide' and one submit/continue button are identifiable from the switch cases.
    • Whether Office versions other than 16.0 are supported; the registry path is hard-coded to 16.0.
    • The precise flow-chart ordering in Process.xaml between the folder branch and the enable/disable-macros registry steps.
  3. Write the SOP

    81.4s7.1k out

    Procedure written →

  4. Check the SOP against the source

    95.2s7.2k out
    Verdict
    minor issues
    Confidence
    high
    Coverage
    Core business process is recovered accurately: config load from Run Config.json/Config.json, optional Orchestrator assets, input form gating by Hide_Inputs + firstRun, single-file vs folder list build with extension filter, AccessVBOM registry enable/disable, per-workbook dated copy into outputFolderPath, VBA macro ExtractNotesAndComments on the copy, per-file result grid, results form with View output / Repeat process, and the exception routes (Init/Processing/Business, NoExcelFiles, NoVBAAccess, screenshot, mailto error email). Values, paths, thresholds and message texts match the source. Genuinely unsupported items (macro output layout, config defaults, volumes, owner) are correctly flagged. Gaps: the Picture-in-Picture branch, the swallowed exception in the folder-listing workflow, the ConfigUtility design-time utility, and the true position of the Save Config block.
    Issues
    1. medium
      Location: Stage 9 vs Stage 10 (ordering of results form and settings persistence)
      Problem: In Main.xaml the 'Save Config' block (set firstRun=False, overwrite Run Config.json) executes inside the success case *before* the 'If Not Hide_Results' → DisplayResultFormSuccess step. The SOP shows the results form (Stage 9) then persistence (Stage 10).
      Correction: Reorder: persist firstRun=False and overwrite MyDocuments\UiPath Configs - Do Not Delete\[project]\Run Config.json, then decide whether to display the results form, then broadcast EndProcess.
    2. medium
      Location: Exceptions and recovery table (folder mode)
      Problem: Missing handler: Continue_Workflows/GetMultipleExelFiles.xaml wraps the folder listing in a Try/Catch that only logs at Fatal and swallows the error, so an invalid/inaccessible excelFolder produces no raised exception at that point.
      Correction: Add a row: folder listing failure → logged Fatal and suppressed; the work list stays empty, so the operator may see the NoExcelFiles business message (or nothing) rather than the real cause. Advise checking logs and folder permissions/path.
    3. low
      Location: Stage 7, step 2 and Data handled → resultFormMessage
      Problem: The assign of "Your automation has completed!" is a separate flow step in Process.xaml whose position relative to Invoke CreateLinks is not resolvable from the outline (as listed it appears after CreateLinks, which appends the totals). The SOP states definitively that the base message is set first and then appended, and the data table sources resultFormMessage to 'Stages 7 and 4' (Stage 4 never sets it).
      Correction: State that CreateLinks appends 'Total Excel workbooks' and 'Successfully processed' to the existing message, and that the placement of the "Your automation has completed!" assign in the flow chart is ambiguous in the source; fix the data-table reference to Stages 6/7 plus initialisation default.
    4. low
      Location: Stage 3 / Data handled (missing element)
      Problem: Picture-in-Picture execution is omitted. Main.xaml sets a 'pip' flag during initialisation, and DisplayInputForm.xaml invokes FormButtonAction in a child session when pip is true (main session otherwise).
      Correction: Note that the automation records whether it was started in UiPath's Picture-in-Picture (isolated desktop session) and, if so, runs the button's process in that child session; Excel work then happens in the isolated session.
    5. low
      Location: Stage 2, step 1 ('always-on-top progress window')
      Problem: 'Always-on-top' is not supported by the outline; the status-window code only sets MaximizeBox=False, ShowIcon=False and a label control.
      Correction: Describe it as a small floating status window that displays broadcast text; drop the always-on-top claim.
    6. low
      Location: Stage 1, step 3 (version compare / firstRun)
      Problem: The version comparison and firstRun=True assignment appear in the outline only at the end of the branch taken when Run Config.json did not exist; the SOP presents it as a step that always runs after loading settings.
      Correction: Keep the behaviour but note the source places the projectVersion comparison in the config-creation/update branch, so its application on the 'existing Run Config' path is inferred, not explicit.
    7. low
      Location: Coverage — ConfigUtility.xaml
      Problem: The ConfigUtility workflow (form-driven editing of Config.json and AssetConfig.json, deletion/rewrite of AssetConfig.json, reset from 'ConfigUtility - Backup.json' with Yes/No confirmation and 'Please rerun the ConfigUtility workflow' prompt) is only mentioned in passing in the data table.
      Correction: Add a short appendix stating it is a design-time/maintenance utility, not part of the runtime process, and list what it writes.
    8. low
      Location: Before you start, item 3 (Trust Center menu path)
      Problem: The File → Options → Trust Center → Trust Center Settings → Macro Settings path is not in the source; only the registry command and the developer's 'enable this manually … reference the user guide' note are.
      Correction: Mark the menu path as general Excel guidance, or cite the user guide as the source per the developer note.
  5. Apply the corrections

    76.8s7.8k out

    Procedure written →

Summarize All Comments and Notes in Excel

This process gathers every cell comment and note that is scattered through one or many Excel workbooks and consolidates them into a single, readable summary. For each workbook the bot makes a dated copy in an output folder, runs a VBA macro against the copy to harvest the comments and notes, and reports per-file success or failure back to the operator. The original workbooks are never touched, so reviewers can pick up the summary copies without any risk to source data.

At a glance

Trigger Manual, attended launch by a user from UiPath Assistant (the desktop launcher for automations). Three Assistant switches control the experience: Hide_Inputs, Hide_Messages, Hide_Results.
Frequency On demand. Not recorded in the source.
Systems used Microsoft Excel desktop (Office 16.0); Windows file system; Windows registry (HKCU\Software\Microsoft\Office\16.0\Excel\Security, value AccessVBOM); local settings file in MyDocuments; UiPath Orchestrator assets (optional); default web browser (user guide); default email client (error reporting)
Inputs Mode choice — single workbook or whole folder; the workbook path or folder path; the output folder path; project defaults from Data\Supporting\Config.json; previous-run settings from MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json
Outputs One summary workbook per input file, named <original name> - Notes and Comments MM.dd<original extension>, in the output folder; an on-screen results form with totals and a per-file result table; refreshed Run Config.json; exception screenshots; execution logs
Typical run Not recorded in the source (no volume or duration information available)
Owner Not recorded in the source

Before you start

  1. Access to a Windows desktop with Microsoft Excel installed. The registry path the bot manipulates is hard-coded to Office version 16.0; other versions are not addressed in the source.
  2. Read access to the source workbooks and write access to the output folder you intend to use.
  3. "Trust access to the VBA project object model" must be available. The bot tries to turn this on for you by writing to the registry, but the developer warns: "If UiPath doesn't have admin rights this step may fail and the user will need to enable this manually (a one-time process) in Excel. Please reference the user guide." In Excel this setting lives under File → Options → Trust Center → Trust Center Settings → Macro Settings.
  4. The macro file must be present in the automation package: Continue_Workflows\Extract Comments and Notes.vb, entry point ExtractNotesAndComments.
  5. A writable MyDocuments folder. The bot creates and maintains MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json. Do not delete this folder — it stores your last-run selections.
  6. Optional: Orchestrator connectivity. If Data\Supporting\AssetConfig.json lists any shared settings ("assets") to be pulled from the central UiPath server, connectivity is needed; if it fails the run continues with a warning.
  7. Decide your Assistant switches before launching:
Switch Effect when checked
Hide_Inputs Skips the input form and silently reuses the previous run's selections and the last button pressed. Overridden on the first run of a newly published version.
Hide_Messages Suppresses the small floating progress window.
Hide_Results Suppresses the final results form — you will not get the option to repeat the run.

Procedure

Stage 1 — Load configuration

  1. Read the project name and version from the automation's own project.json.
  2. Look for the saved settings file at MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json.
    • If it exists, load it as this run's settings, so the input form is pre-filled with last time's choices.
    • If it does not exist, create the folder structure (UiPath Configs - Do Not Delete, then a sub-folder named after the project) and build the settings from the packaged defaults in Data\Supporting\Config.json.
  3. Compare the stored project version against the current one. If they differ (or the comparison fails), flag this as a "first run" — this forces the input form to appear even when Hide_Inputs is checked.
  4. If the user-guide URL setting (userGuideUrl) is blank, substitute the text "No user guide link available".
  5. If Data\Supporting\AssetConfig.json exists, fetch each named setting from Orchestrator and merge it into the run settings. A retrieval failure is logged as a Warning only and the run continues.
  6. Any failure in this stage is treated as a technical (system) exception and takes the run straight to the error results form — see Exceptions and recovery.

Stage 2 — Start the progress window

  1. Unless Hide_Messages is checked, a small always-on-top progress window opens alongside the main process. It listens on a named internal message channel (setting statusWindowChannel) and displays whatever text the process broadcasts to it.
  2. Initial text is "Welcome to your UiPath automation".
  3. If the operator closes this window by hand, message handling stops and the run continues silently. The internal message EndProcess closes it at the end of the run.

Stage 3 — Collect the operator's selections

  1. The bot minimises the UiPath Assistant window so the forms are visible.
  2. Decision — show the form or not?
    • If Hide_Inputs is checked AND this is not the first run of this version: the form is skipped entirely. The bot logs "User Inputs form hidden, using previous inputs" and immediately runs the process associated with the button pressed on the last run.
    • Otherwise: the input form is displayed, pre-populated from the saved settings.
  3. On the input form the operator sets:
    • the mode — single workbook (selectType = singleExcelFile) or whole folder;
    • the workbook path (selectFile) or the folder path (excelFolder);
    • the output folder (outputFolderPath).
  4. Buttons identifiable in the source: Cancel, view user guide, and a submit/continue button that starts the extraction. (The full button inventory is not visible in the source.)
    • If "view user guide" is pressed, the URL held in userGuideUrl opens in the default browser. If it cannot be opened, the URL text is pushed into the progress window instead so the operator can copy it.
    • If Cancel is pressed, or the form is closed with the "X", a cancelled flag is set, "Ending process from Form cancellation" is logged, and the run ends without processing anything.
  5. When a submit button is pressed, "Process started" is broadcast to the progress window. If the window is not yet drawn (common when the input form was hidden), the broadcast is retried once with a three-second allowance.

Stage 4 — Build the workbook list

  1. If selectType = singleExcelFile:
    • Broadcast "Processing single Excel file".
    • Add the one path held in selectFile to the work list.
    • Broadcast "Aggregating comments and notes for a single file — Please wait...".
  2. Otherwise (folder mode):
    • Broadcast "Processing multiple Excel files".
    • List every file directly inside the folder named in excelFolder.
    • Keep only files whose names contain .xlsx, .xls or .xlsm. Anything else is logged as "<filename> excluded" and ignored.
    • Broadcast "Aggregating comments and notes for multiple files — Please wait...".
  3. If the work list is empty, stop: the bot raises a business exception using the configured message text held under the key NoExcelFiles.

Ambiguity to note: the flow-chart ordering in Process.xaml is not fully resolvable from the outline. The empty-list check and the "enable macros" registry step appear explicitly only on the single-file branch. Treat the empty-list check and the registry enable as applying to both branches, but verify against the live process if you are rebuilding it.

Stage 5 — Enable programmatic access to Excel VBA

  1. The bot runs a command-line registry write: REG ADD HKCU\Software\Microsoft\Office\16.0\Excel\Security /v AccessVBOM /t REG_DWORD /f /d 1
  2. This is the machine equivalent of ticking "Trust access to the VBA project object model" in Excel's Trust Center, and it is required before the extraction macro can be injected into a workbook.
  3. Developer note: "This code snippet changes the registry key so Excel can run VBA macros." If UiPath is running without sufficient rights the write can fail silently here and surface later as a "Visual Basic Project" error during processing.

Stage 6 — Copy and process each workbook

For every file in the work list, in order:

  1. Build the destination path: <outputFolderPath>\<original file name without extension> - Notes and Comments <MM.dd><original extension> (MM.dd is today's month and day.)
  2. Copy the source workbook to that destination, overwriting any file already there with the same name.
  3. Broadcast "Processing Excel workbook #n — Please wait..." (n counts from 1).
  4. Open the copy in Excel with auto-save off, and run the macro ExtractNotesAndComments from Continue_Workflows\Extract Comments and Notes.vb against it. Log "Comments and Notes extracted".
  5. Broadcast "Finished Excel workbook #n".
  6. Increment the success counter and add a row to the per-file results table: file name plus "Successfully processed".
  7. If anything fails for this workbook:
    • If the error message contains "Visual Basic Project", the run stops with a business exception using the configured text under key NoVBAAccess — the operator must enable VBA project access in Excel manually.
    • Otherwise: the half-finished copy at the destination path is deleted, the failure is logged, and a results-table row is added with the file name and the error message. The loop continues to the next workbook — one bad file does not abandon the batch.

The original workbooks are never opened for writing at any point.

Stage 7 — Compile results

  1. Convert the per-file results table into the grid displayed on the results form (setting resultGrid).
  2. Set the base result message to "Your automation has completed!" and append:
    • Total Excel workbooks: <count of files in the work list>
    • Successfully processed: <success counter>
  3. Turn on the "View output" button flag so the results form offers a shortcut to the output folder.

Stage 8 — Disable programmatic access to Excel VBA

  1. The bot runs the reverse registry write: REG ADD HKCU\Software\Microsoft\Office\16.0\Excel\Security /v AccessVBOM /t REG_DWORD /f /d 0
  2. Developer note: "This code snippet changes the registry key so Excel macros are disabled." This returns the machine to its locked-down state so the elevated trust does not persist between runs.

Stage 9 — Persist settings, then show results and offer a repeat

  1. Broadcast "Process complete" to the progress window.
  2. If this was flagged as a first run, set the first-run flag to False so that future runs with Hide_Inputs checked will skip the form.
  3. Overwrite MyDocuments\UiPath Configs - Do Not Delete\[project name]\Run Config.json with the current settings, so the next run is pre-populated. Developer note: "This allows the configuration from the last successful execution to be saved and prepopulated on the next run."
  4. If Hide_Results is not checked, display the results form showing the summary message, the per-file grid, a View output button (opens File Explorer at outputFolderPath) and a Repeat process button.
  5. If the operator presses "Repeat process": exception state and internal flags are reset and the input form is shown again from Stage 3. Otherwise the run proceeds to close down.
  6. If Hide_Results is checked, no form appears and the operator gets no opportunity to repeat.

Stage 10 — Close down

  1. Broadcast EndProcess to close the progress window and finish.

Exceptions and recovery

Condition What the automation does What a human should do
Configuration cannot be loaded or built at start-up Logs at Fatal level; creates an empty settings dictionary if needed purely so the error form can render; shows the error results form. If the operator does not press "Repeat process", re-throws as "Init Error - ..." and the run ends. Developer note says the user cannot resolve this themselves. Check that MyDocuments is writable and that Data\Supporting\Config.json is present and valid JSON; escalate to the automation owner.
Folder listing fails in folder mode (invalid or inaccessible excelFolder) The error is logged at Fatal level and then suppressed — no exception is raised at that point. The work list simply stays empty, so the operator sees the NoExcelFiles business message (or nothing) rather than the real cause. Check the execution log for the Fatal entry to find the true error, then verify the folder path is correct, exists, and that you have permission to read it. Re-run.
No Excel workbooks found for the selection Raises a business exception using the configured message under key NoExcelFiles; the error results form is shown. Confirm the folder path is correct and contains .xlsx, .xls or .xlsm files, or that the single-file path exists. Re-run.
Excel refuses programmatic access to the VBA project (error text contains "Visual Basic Project") Converts the failure into a business exception using the configured message under key NoVBAAccess. In Excel: File → Options → Trust Center → Trust Center Settings → Macro Settings → tick "Trust access to the VBA project object model". This is a one-time change. See the user guide.
A single workbook fails during copy or macro execution Deletes the partial copy at the destination, logs the failure, records file name + error message in the per-file results table, and continues to the next workbook. Read the per-file grid on the results form. Investigate the named workbook (protected, corrupt, open elsewhere, password-protected) and re-run it on its own in single-file mode.
Any other business-rule failure during form completion or processing (including a generic error whose text contains "Business Exception") Logged at Error level with business-process log fields; error results form shown; re-thrown as "Processing Error - ..." unless the operator repeats. Read the message on the form, correct the underlying data or selection, then repeat or re-launch.
Any other technical failure Logged at Error level; a full-screen screenshot is saved as ExceptionScreenshot_yyMMdd.hhmmss.png in the folder from setting exScreenshotsFolderPath (a screenshot failure itself only logs a Warning); error results form shown; re-thrown as "Processing Error - ..." unless the operator repeats. Use the "email the error" button on the form, attach the screenshot, and escalate.
Operator wants to report an error The error results form offers a button that opens the default mail client with a draft addressed to the setting errorEmailRecipient, subject <business process name> <error type>, body = the error message. Send it, adding what you were doing and which workbook(s) were involved.
Operator cancels the input form or closes it with "X" Sets a cancelled flag, logs "Ending process from Form cancellation", ends without processing. Nothing. Re-launch when ready.
User-guide link cannot be opened Broadcasts the URL text into the progress window instead. Copy the URL from the progress window and open it manually.
An Orchestrator asset named in AssetConfig.json cannot be retrieved Logs a Warning "Loading asset X failed: ..." and continues without it. Usually harmless. If behaviour looks wrong, check Orchestrator connectivity and the asset name/folder in AssetConfig.json.
Progress window not yet drawn when processing starts (typical when the input form was hidden) Retries the "Process started" broadcast once with a three-second allowance, per developer note. Nothing.
Registry write for AccessVBOM fails (insufficient rights) No dedicated handler; the consequence appears later as the "Visual Basic Project" error above. Enable the Trust Center setting manually, or run with the rights needed to write to HKCU.

Data handled

Name What it holds Where it comes from
dict_Config / io_dict_Config The single run-settings bundle passed to every part of the automation — file paths, mode choice, message texts, flags, result text. Built at start-up from Run Config.json (if present) or Data\Supporting\Config.json, then merged with Orchestrator assets and updated by the input form.
selectType singleExcelFile for one workbook; any other value means folder mode. Input form
selectFile Full path of the single workbook to process. Input form
excelFolder Folder whose .xlsx/.xls/.xlsm files will all be processed. Input form
outputFolderPath Where the dated summary copies are written; also the folder opened by the "View output" button. Input form / config
list_excelFilesList The working list of workbook paths for this run. Stage 4, from selectFile or the folder listing
str_newFilePath Destination path of the current copy: <outputFolderPath>\<name> - Notes and Comments MM.dd<ext>. Computed per workbook
dt_resultGrid / resultGrid One row per workbook: file name and either "Successfully processed" or the error message. Displayed on the results form. Built during Stage 6
resultFormMessage The text shown on the results form — "Your automation has completed!" plus total and success counts. Stages 7 and 4
NoExcelFiles, NoVBAAccess Configured wording for the two business-rule failure messages. Data\Supporting\Config.json
userGuideUrl Link opened by the "view user guide" button; replaced with "No user guide link available" if blank. Config
errorEmailRecipient Support address used in the pre-filled error email. Config
exScreenshotsFolderPath Folder where exception screenshots are saved. Config
statusWindowChannel Name of the internal message channel used to push progress text to the floating window. Set during initialisation
firstRun, formCanceled, repeatProcess, showViewOutput Control flags: force the form on a new version; operator cancelled; operator asked to repeat; show the "View output" button. Set during the run; firstRun persisted in Run Config.json
Hide_Inputs, Hide_Messages, Hide_Results Operator-set switches controlling whether the input form, progress window and results form appear. UiPath Assistant at launch
AssetConfig.json entries Names of shared settings to pull from Orchestrator, each with an asset name and an Orchestrator folder. Data\Supporting\AssetConfig.json, maintained via the ConfigUtility form

Not determinable from the source

  • What the ExtractNotesAndComments macro actually writes — target sheet name, layout, and whether comments are consolidated onto one new sheet or listed per source sheet. Only the .vb file path and entry-point name are visible.
  • Default values for outputFolderPath, selectFile and excelFolder — these live in Data\Supporting\Config.json, which is not included.
  • The literal wording of the configured messages NoExcelFiles and NoVBAAccess.
  • The support email address in errorEmailRecipient and the user-guide URL in userGuideUrl.
  • Typical run volumes (workbooks per run) and expected runtime.
  • Who owns the output folder, who consumes the summary workbooks, and any downstream process or retention rules.
  • Whether this is ever run unattended or on a schedule; only attended launch from UiPath Assistant is visible.
  • The full inventory of input-form buttons — only Cancel, "view user guide" and one submit/continue button are identifiable.
  • Whether Office versions other than 16.0 are supported; the registry path is hard-coded.
  • The precise flow-chart ordering in Process.xaml between the folder branch and the enable/disable-macros registry steps.

How this SOP was checked

Generated from the project's source files and audited against them. Audit verdict: minor issues, confidence high.

Core business process is recovered accurately: config load from Run Config.json/Config.json, optional Orchestrator assets, input form gating by Hide_Inputs + firstRun, single-file vs folder list build with extension filter, AccessVBOM registry enable/disable, per-workbook dated copy into outputFolderPath, VBA macro ExtractNotesAndComments on the copy, per-file result grid, results form with View output / Repeat process, and the exception routes (Init/Processing/Business, NoExcelFiles, NoVBAAccess, screenshot, mailto error email). Values, paths, thresholds and message texts match the source. Genuinely unsupported items (macro output layout, config defaults, volumes, owner) are correctly flagged. Gaps: the Picture-in-Picture branch, the swallowed exception in the folder-listing workflow, the ConfigUtility design-time utility, and the true position of the Save Config block.

2 corrections from the audit were applied to the procedure above.

Remaining minor notes, not corrected:

  • Stage 7, step 2 and Data handled → resultFormMessage — The assign of "Your automation has completed!" is a separate flow step in Process.xaml whose position relative to Invoke CreateLinks is not resolvable from the outline (as listed it appears after CreateLinks, which appends the totals). The SOP states definitively that the base message is set first and then appended, and the data table sources resultFormMessage to 'Stages 7 and 4' (Stage 4 never sets it). (State that CreateLinks appends 'Total Excel workbooks' and 'Successfully processed' to the existing message, and that the placement of the "Your automation has completed!" assign in the flow chart is ambiguous in the source; fix the data-table reference to Stages 6/7 plus initialisation default.)
  • Stage 3 / Data handled (missing element) — Picture-in-Picture execution is omitted. Main.xaml sets a 'pip' flag during initialisation, and DisplayInputForm.xaml invokes FormButtonAction in a child session when pip is true (main session otherwise). (Note that the automation records whether it was started in UiPath's Picture-in-Picture (isolated desktop session) and, if so, runs the button's process in that child session; Excel work then happens in the isolated session.)
  • Stage 2, step 1 ('always-on-top progress window') — 'Always-on-top' is not supported by the outline; the status-window code only sets MaximizeBox=False, ShowIcon=False and a label control. (Describe it as a small floating status window that displays broadcast text; drop the always-on-top claim.)
  • Stage 1, step 3 (version compare / firstRun) — The version comparison and firstRun=True assignment appear in the outline only at the end of the branch taken when Run Config.json did not exist; the SOP presents it as a step that always runs after loading settings. (Keep the behaviour but note the source places the projectVersion comparison in the config-creation/update branch, so its application on the 'existing Run Config' path is inferred, not explicit.)
  • Coverage — ConfigUtility.xaml — The ConfigUtility workflow (form-driven editing of Config.json and AssetConfig.json, deletion/rewrite of AssetConfig.json, reset from 'ConfigUtility - Backup.json' with Yes/No confirmation and 'Please rerun the ConfigUtility workflow' prompt) is only mentioned in passing in the data table. (Add a short appendix stating it is a design-time/maintenance utility, not part of the runtime process, and list what it writes.)
  • Before you start, item 3 (Trust Center menu path) — The File → Options → Trust Center → Trust Center Settings → Macro Settings path is not in the source; only the registry command and the developer's 'enable this manually … reference the user guide' note are. (Mark the menu path as general Excel guidance, or cite the user guide as the source per the developer note.)

Source