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: