I have four container fields that I would like to use to store small .xlsx files. The script is performed on the server. If no files are found in a search, I want to fill that container with a blank Excel file that is stored on the server in the documents folder. The problem is, if no files are found, as is the case with the second highlighted line, the line after the Else is not storing the file to the container. I duplicated the line and put it with the first search (first highlighted line) to make sure the format was correct and it DOES go into the container. Any ideas what could be the problem?
I also tried filling all the containers with the blank file at the start of the script. What happened was that the containers were filled with the blank Excel files but then they weren't replaced by the newly generated file. All four containers contained the blank file when 3 of the 4 should have been replaced. This is for a WebDirect solution and they insist on having .xlsx files instead of tab-delimited files, hence the PSOS.