Alteryx Designer Desktop Discussions

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

Creating a workbook in R

emorrill
6 - Meteoroid

Hi All,

 

I am working with the "OpenXLSX" package in R and was wondering, if I create a workbook with multiple tabs utilizing the R tool can I directly output that into the excel output tool or do I need to create separate outputs for each tab and then each table within each tab and organize it in a different way. 

 

Thanks

7 REPLIES 7
JoeS
Alteryx
Alteryx

I think you'd output it within the R code itself?

 

Or do you mean you have created different elements and want to then read them into Alteryx designer?

emorrill
6 - Meteoroid

The final output of my R script is a workbook in .xlsx format. It has multiple tabs and and multiple tables within each tab. I would like to just utilize that script and have the output from the R function be the .xlsx file but I was not sure how that would be possible using alteryx where exporting an XLSX file requires you to select the sheet you wish to output to.

roe_r
7 - Meteor

You can use R to output an Excel file without sending the data back out through Alteryx.  Check out the R package 'openxlsx' (although there are many that do something similar) to write to an excel book.

 

If you need an example, here's an Alteryx app that I created that lets you write Alteryx data to a specific range within an excel workbook.  Check out the R code in the macro for an example of how to write out to an excel file.

JoeS
Alteryx
Alteryx

As above, if your output is handled by R, then you don't need to worry about passing anything back to Alteryx. It sounds like R is doing the work you need 🙂

emorrill
6 - Meteoroid

I wasnt able to see any attachment. I have code using openxlsx so I just want to confirm that I am using the same process to output the excel. Does the output handle multiple tabs or just single tab excels using openxlsx?

roe_r
7 - Meteor

Of course I forgot to attach the workflow.  Here is is.

roe_r
7 - Meteor

Just to follow up on your question, openxlsx can output multiple tabs

Labels