19-06-24 11:01 PM - edited 19-06-24 11:17 PM
Hi all,
I am developing a process where I need to access a folder, 'Folder1' contained within a network drive. Within this folder, there are subfolders by year and then month. I need to be able to access files within the correct folder depending on the current year and month.
However I have found that the dynamic file path I am generating does not work despite being identical to the actual file path I would use if I were to hardcode it.
I am using a config file with the following example file path structure:
L:\Folder1\<YEAR>\<MONTH>\Filename.xlsm
During the process I am using a multi-calculation stage to replace the two text placeholders using FormatDate(Now(), "yyyy") and FormatDate(Now(), "MM. MMMM") to generate e.g. 2024 and 06. June respectively, so the file path becomes:
L:\Folder1\2024\06. June\Filename.xlsm
For some reason the above generated file path does not work despite being identical to the file path retrieved from the Security tab of the properties window for the file. I am at a loss and hoping to get some help!
I have checked for leading/trailing spaces, used Trim() to eliminate these. I have pasted both the generated path and the actual path into a notepad document and compared them character by character. My working theory is that Blue Prism has somehow introduced some kind of special character into the string.
This method is working in other processes with identical logic but not this one. I am posting from mobile so apologies for any formatting issues. Thanks in advance.
Answered! Go to Answer.
20-06-24 11:25 AM
Hi Devneet,
Your answer revealed the cause of the issue, the solution was to delete the column in the config excel file and recreate it. Thanks for your help, you have saved me a lot of heartache!
20-06-24 11:46 AM - edited 20-06-24 11:47 AM
@PeterHeyburn123 - Really glad that both and @GeoffHirst could help you resolve the issue! Most of the time, I have also seen in past Excel usually gives these odd behaviors good thing you have this file in your control so not much of an issue to reformat it but I have seen this behavior with some of my Spanish client files that used to come from an ERP system like SAP Concur where many times these UNICODE characters mess up the structure and it's a nightmare for us to handle this.
Hope to see you in community forum soon and wish you have an amazing time ahead with your project!
20-06-24 11:46 AM
Nice one chaps, I am pleased we have a solution here. Nice one Devneet, well done sir.
regards