Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Error When Outputting Data to Multiple Files

abe_ibanez
9 - Comet

Hello, 

 

I have a macro that reads in data from an Excel sheet, re-organizes it, and then writes it to a different tab on the same workbook. We use a macro because we have the same template for several of our locations. The problem that I am running into is that for most locations, the macro works as expected, but for a few of them, the file appears to be corrupted after we run the workflow. When I try to open those few files, Excel gives me the following error message after it has finished recovering the file: 

"The name in the end tag of the element must match the element type in the start tag"

 

I have tried to compare everything I can between the files that the macro does work for, and the once for which it does not, and I cannot find any difference. I am very confused why it works perfectly fine with some of the Excel files, but not others given that they are all nearly identical (only different file name and data, but same structure and format). 

I have narrowed the issue down to a particular output tool. Here is how I have it formatted: 

Screenshot 2024-11-20 152130.png

 

For reference, I am using Alteryx Version: 2024.1.1.136 Patch: 4

 

Any help is greatly appreciated. I have been working on this issue most of the day and still have no Idea why it works for some files but not others. 

 

Thank you!!

3 REPLIES 3
kamanivk
8 - Asteroid
  • Write the output to a different file
  • Delete the input file through command event
  • Rename the output file to the input file

May be this way the input file does not have a lock when trying to write data to the same file.

abe_ibanez
9 - Comet

I just tried this, and I am still getting the same Excel error message when I open the files 🙁

I guess part of my confusion is why it works fine with 90% of the files we work with, but corrupts the other 10%. It's also always the same files that cause the issue. 

danettedavis
8 - Asteroid

Check the length of what the tabs are being named.  When this happens to me, I usually just need to shorten the tab names and then it is fine.  You will probably need to rename the file as it may think that you are still trying to use the original. 

Labels