Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

VBA on render output for multiple files

ck2019
9 - Comet

Hi everyone

 

I've found the article on how to run and execute VBA in Alteryx but I can't get it to work for my specific circumstances..

 

I've got 70 odd files, which are referenced in a full path which is used in the rendor tool, all in separate locations (driven by country)

 

The reporting funcitionality isn't generating the right column widths and I can't get it to work so I grabbed this VBA off the net and adapted it to autofit the cells as well.  I just not sure how to get it to cycle through each file and run the vba script...

 

I've created some sample files and copied the vba in a comment in the attached package for convenience for some kind person that may help me!! Thanks for reading

 

 

Sub ConvertDataToTables()
'ConvertDataToTables Macro, This Code will convert all the data in the Excel Worksheet to Excel Tables
' Made It Easy By ExcelExciting.com
Dim i As Integer
Sheets(1).Select

For i = 1 To Sheets.Count
Sheets(i).Activate
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
If ActiveSheet.ListObjects.Count < 1 Then
ActiveSheet.ListObjects.Add.Name = ActiveSheet.Name
End If
Next i
For Each sht In ThisWorkbook.Worksheets
sht.Cells.EntireColumn.AutoFit
Next sht
End Sub

 

 

0 REPLIES 0
Labels