Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Output corrupt excel xlsx file

Tmanuela
8 - Asteroid

Hi, 

 

My flow seems to output corrupted excel files rendered from a db, and the output tool is set up to output to a new filepath created beforehand with a formula tool. 

I see it is corrputed when I run a VBA macro on an excel template that needs to open this output files from Alteryx..and because of this error I can not run my VBA code.. 

Any thoughts?

Pretty urgent.

Thank you!

M.Screenshot 2021-03-03 145358.jpgScreenshot 2021-03-03 145441.jpgCapture5.JPG

2 REPLIES 2
jamielaird
14 - Magnetar

Hi @Tmanuela ,

 

I found this post from @MsBindy which suggests a way to solve this by adding a command into your VBA to repair the file.

 

Sub Import_Click()

Application.DisplayAlerts = False

Workbooks.Open "filepath/filename.xlsm", CorruptLoad:=XlCorruptLoad.xlRepairFile

End Sub

 

Source: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Output-to-Excel-error/m-p/49277/highli...

 

Another suggestion, from @Amilykassia is to update your Protected View settings:

 

  1. Go over to the File Menu and click on Options
  2. In the Options window, choose the last tab,Trusted Centre
  3. Now click on ‘Trusted Center Settings
  4. In the new window, choose ‘Protected View
  5. Unchecked all the options available and click OK

Source: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Excel-file-corrupt-after-writing-outpu...

Tmanuela
8 - Asteroid

Hi @jamielaird ,

 

Thank so much for your reply, I did applied VBA code and repaired all corrupted excel files, now runs ok, and extra applied settings mentioned on 2nd solution. 

Cheers,

M.

Labels