31 Replies Latest reply on Aug 30, 2016 10:23 AM by WolfShade

    SpreadsheetNew():  Programmatically insert a line break into a cell

    WolfShade Level 4

      Hello, all,


      I'm using SpreadsheetNew() to create an .xlsx file that will contain groups and all the users associated with said groups.  I'm trying to figure out a way to insert a line break within a cell for groups that have more than one person.  So, ideally, the format would be like:


      Group One       |             Adam Smith
                      |             Jaime Doe
                      |             Cindy Morgan
      Group Two       |             James Coburn
                      |             Bruce Lee
      Group Three     |             Samantha Brooks
                      |             Steve Perry


      .. etc.


      I've set the query (LEFT OUTER JOIN) so that it will aggregate the names and insert a chr(10) between each name (LISTAGG()).  Excel is not seeing this.  All names are on the same line.  How can I programmatically insert a line break that the Excel cell will recognize?