DataSnipper relies on Microsoft libraries that enforce file path length limits. Exceeding these limits can cause issues when opening Excel files or working with the document viewer. This article explains the limits, the scenarios where they apply, and how to resolve them.
File path limits by version
v6.0 and earlier: 260-character file path limit
v6.1 and later: 400-character file path limit
Key scenarios where path length causes issues
Opening files from local or mapped drives
If the file path exceeds the character limit (260 for v6.0, 400 for v6.1), Excel displays an error when you try to open the file. This identifies the issue directly. Resolve it by relocating or renaming files or folders to shorten the path.
Opening files from OneDrive or SharePoint via desktop Excel
When files stored on an online drive are opened through the desktop Excel app and the path exceeds the limit, no error message appears. Instead, DataSnipper's document viewer silently fails to open. The log file will contain a System.IO.PathTooLongException error, which confirms the cause.
Windows 10 MAX_PATH override
Windows 10 (version 1607 and later) can have the 260-character MAX_PATH limit removed at the OS level. However, enabling this does not override DataSnipper's own file path limit of 400 characters. Both limits apply independently.
Questions to ask clients
Use these questions to identify potential issues before they cause disruption:
How are users accessing Excel files, via local drives, mapped drives, or online drives like OneDrive or SharePoint?
Are files saved in deeply nested folders or with long file names?
Have any users reported that the DataSnipper document viewer is not loading? This may indicate a path length issue when files are accessed from an online drive.
Has your IT department enabled the MAX_PATH override in Windows 10? If so, note that DataSnipper still enforces the 400-character limit.
Best practices
Store files in directories with shorter paths and avoid long file names.
Use flat folder structures where possible to stay within the 400-character limit.
Educate users on the path limits and their impact, especially when accessing files from online drives.
Check logs for
System.IO.PathTooLongExceptionif users report the document viewer not opening.Communicate to IT that DataSnipper's 400-character path limit applies regardless of Windows MAX_PATH settings.
Workaround: mapped SharePoint directory link
If you cannot move files or shorten directory names, you can create a folder junction, symbolic link, or shortcut to a mapped SharePoint directory. This effectively shortens the path used by DataSnipper without changing the actual file location.
Before rolling this out, be aware of the following:
If users have Embed PDFs disabled in DataSnipper settings, or if files are imported during co-authoring, the link path may be used instead of the original path. Changes to the link or its target directory could break references to imported files.
Test this workaround in a controlled environment before deploying to all users, particularly in co-authoring scenarios.
If any issues arise related to file paths, contact the DataSnipper Support team for assistance.
