Dynamically add columns (number of columns depend upon number of records) in excel
Application Type
Traditional Web
Service Studio Version
11.14.14 (Build 59923)

I have developed a survey feature using which app admin can create and release surveys for his employees. Now, I want to download a report containing answers submitted by each employee. The questions should get populated in columns and employees should get populated in rows with their answers corresponding to their names. Each survey might contain different number of questions. Which means the number of columns and rows is not fixed. 

The required excel report format is-


Current report format is-  

I have no permission to use any forge component. Please let me know if there's any other way to populate rows and columns dynamically.

Sounds like your best bet is to put the user responses into a record list (User, List of Responses) and compile all of them into one List of Records. Then, use the Export Record List to Excel action with a for each loop and that should fix your problem. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.