Alteryx designer Discussions

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

Excel output data set row design "table style medium 2". design change at run time

Highlighted
Atom

Hi ,

 I need to extract daily data from oracle database into excel workbook (Sheet 1 : Summary , Sheet 2 : Data).

now my issue is i need to set the output data set row  design  "table style medium 2". even i have tried to add default design into excel workbook but based on my filter output rows count change which is not good and user is unable to filter out extra rows .i have multiple user those are using this file so i cann't add default excel template(xlst) into their system.

Please let me know if you have any sample workflow with this condition.

 

Please do the needful.

 

 

 

Highlighted
Community Operations Manager
Community Operations Manager

Hi @deepaks3 Thank you for your contribution to the Community! To help make it easier for others to assist, it would be helpful to get some additional information on your process. Here's what we recommend you include in your reply: • What Alteryx Version are you using? • Do you have a Workflow with sample data you can share? • What about a Screenshot? • What does the data look like? (Beginning data vs. Final Output) • How would one replicate the issue? • Did you receive an Error Message?

 

Thank you very much!

DanM

Highlighted
Quasar
Quasar

With the Run Command tool, you could create a VBScript file (.vbs) and run it. Use something like a Formula tool prior to dynamically create the VBScript to be written.

 

something like:

 

On Error Resume Next 'Comment this line if it is not working to find the issue, you will need to use Task Manager to manually end Excel if there are errors

Set objExcel = createobject("Excel.Application")
objExcel.visible=False           
Set objWorkbook = objExcel.Workbooks.open("E:\Excel File.xlsx")    'replace this file path with your file

Set objSheet = objWorkbook.Worksheets("Summary")
objSheet.Activate
Set rng = objSheet.Range(objSheet.Range("A1"), objSheet.Range("A1").SpecialCells(11))
Set tbl = objExcel.ActiveSheet.ListObjects.Add(1, rng, , xlYes)
tbl.TableStyle = "TableStyleMedium2"

Set objSheet = objWorkbook.Worksheets("Data")
objSheet.Activate
Set rng = objSheet.Range(objSheet.Range("A1"), objSheet.Range("A1").SpecialCells(11))
Set tbl = objExcel.ActiveSheet.ListObjects.Add(1, rng, , xlYes)
tbl.TableStyle = "TableStyleMedium2"

objWorkbook.Save()

objExcel.DisplayAlerts = False
objWorkbook.Close False
objExcel.Quit
Set objWorkbook = Nothing
Set objSheet = Nothing
Labels