You would need to configure LoadImages to extract metadata from the subfolder name. From “Extract metadata from where?”, select “Path” and enter the following:
.*\\/](?P<SubFolder>.*)$ This serves to grab the sub-folder name for each image set and stores it as a metadata tag called “SubFolder”.
Then, in ExportToSpreadsheet, select the data to export, and uncheck the “Use the object name for the file name?” box. In the box that appears, right-click at the beginning of the file name and you should see a drop-down which contains the tag “SubFolder”. Select this tag and it will appear in green in the location in the filename where you clicked. What this will do is assemble the results on a per-subfolder basis and write them out to a spreadsheet you defined with the sub-folder metadata. All images with the same sub-folder name (i.e., contained in the same sub-folder) will be placed together in the same file.