Creating a workbook in R
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Just to follow up on your question, openxlsx can output multiple tabs
