#3115·sherlock

bug: --xlsx ignores --folderoutput (spreadsheet always written to CWD)

Author: twelfthlaborCreated Sep 10, 2026Updated Sep 10, 2026

Summary

--folderoutput is honored by the --txt branch (sherlock.py ~825-831) and the --csv branch (~845-851), but the --xlsx branch hardcodes DataFrame.to_excel(f"{username}.xlsx", ...) (~line 927) and never consults args.folderoutput. The spreadsheet always lands in the current working directory.

Steps to reproduce

sherlock --timeout 5 --site GitHub --folderoutput ./dest --txt --csv --xlsx daniel
ls ./dest          # daniel.txt and daniel.csv are created as documented
ls daniel.xlsx     # WRONG: written to CWD, not ./dest

Observed: daniel.xlsx is written to CWD while txt/csv correctly land in ./dest.

Expected: ./dest/daniel.xlsx — consistent with the other output formats.

Note

Distinct from #2891 (response_time_s cell values) and open PR #3077 (which fixes the response_time_s fallback and sites.py defaults, not the output path). Fix is small: mirror the csv branch's os.makedirs + os.path.join handling in the xlsx branch.

Environment: macOS, Python 3.13, master @ 3760187.

Source: sherlock-project/sherlock