Use Excel File Activity Main.xaml: A file name cannot contain a newline, or any of the following characters: * : ? " < > |

When using the Use Excel File activity on a Excel file stored in a SharePoint (Teams) synced directory, it will display the following error message: Main.xaml: A file name cannot contain a newline, or any of the following characters: * : ? " < > |

Excel File Path from Advanced Editor:
string.Format(“{0}\My Company\My Teams Synced Folder - Documents\General\Sub Folder\File.xlsx”, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))

What I have noticed is that if I remove the “- Documents” it clears the error. What I did to resolve this is navigate to my desired Microsoft Teams, enter the default General channel, click on “Sync” from WITHIN the General directory. If you sync the parent directory of the General directory - “Documents” then it will fail and detect a “newline”. Tested and confirmed the fix.

Also, when I was receiving the error message, I entered the advanced editor for the activity, copied the “My Teams Synced Folder - Documents”, created a new Windows folder on my local profile and pasted the text from the editor, Windows gave me the same error message when naming the folder. Something is off and it appears like a new line is being injected but not seen in the advanced editor.

Current version of StudioX: 2020.10.6
Excel Activity Package: v2.12.3
System Activity Package: v22.4.1
OS: Windows 10 Enterprise 64-bit

Here is the error:

Here is the Sharepoint/Onedrive local directory:

Hi @mikeib182

Would you mind accompanying your feedback with a few screenshots? It is neatly written, but some visuals will make it a bit easier to understand due to many small details bundled together.

1 Like

Added a couple screenshots of directory path and the project error.

Hi @mikeib182 ,

I’ve tried repro’ing this on a recent version of Studio and this error doesn’t occur anymore. Does this occur on a different folder in sharepoint? For example, if you’ve created one from scratch.


This topic was automatically closed after 9 days. New replies are no longer allowed.