Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
6 subscribers
Views
4394 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Downlaod to excel
benh3891
over 8 years ago
Any suggestions for Exporting a multiple variable to an Excel Template.
I have been using the following:
forum.appian.com/.../Text_Doc_From_Template_Smart_Service.html
But my goal is for the multi-row query result to be printed to individual grid cells. It seems that joinarray, which the document suggests, prints the result to multiple lines but within the same grid cell.
Thank you
OriginalPostID-264357
Discussion posts and replies are publicly visible
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
How exactly are you creating an Excel document using the Text Doc from Template smart service? It doesn't seem to me like it would be a very good fit for this use case, though I would be willing to take a look at your configuration just in case.
And, is the Export CDT to Excel smart service not available for some reason?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benh3891
over 8 years ago
I haven't been able to get the export cdt to work correctly. I'm not sure where to begin, there doesn't seem to be much documentation. Do you have any suggestions? When configuring the CDT I am not sure what should be populated in the Data/inputs/node inputs. With the text doc to template there was a straightforward mapping that worked well.
I am using expression rules to generate process variables. One of the variables is a single row, the other is multi row. The text to from template works really well for the single row variable, but I am unsuccessful with the multi row. The list variable is printed within the same grid as shown above.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
In the "Export CDT to Excel" smart service, you simply need to feed in your template file ("Excel_base_template"), your CDT Array PV ("Cdt"), a text list consisting of the case-sensitive CDT field names ("Cdt_fields_to_export"), the starting cell (in your case you'd pass in "B7"), sheet number (zero-indexed iirc, so pass in 0). Ignore "Cell_keys" and "Cell_values" at first as these are just used to fill specific fields (after you get it working for your CDT you'd fill these in to fill static fields such as project name as needed).
AFAIK the text from template will literally populate the cell(s) where you have the replacement key(s) no matter what, so no matter what you do, all the values you pass into B7, C7, etc, will populate in just those cells. I'd need to see a screenshot of your template to be sure - but tbh it's probably not worth your time as it'd be easier just to get the Export CDT one to work instead.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benh3891
over 8 years ago
Thanks for the reply. I've been trying 'Export CDT to excel' but I am receiving an error message saying to "Examine the activity class". For cdt I am referencing =pv!FlatView, for the field names I am just imputing a list ={"Var1", "Var2"}. I think those should be the potential errors. Included is a snapshot of the process variable I am trying to work with.
I think you are right about the text from template.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
Can you show me the field definitions for the FlatView CDT? Also can you show me an overview of the configuration within the smart service node?
Also the one thing I left out of my previous instructions, just in case you missed it - make sure you're providing a valid name for the generated document and a valid destination folder.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benh3891
over 8 years ago
It works for the first sheet! Thank you. Now when adding an additional node to write to the second sheet, does anything need to be changed in the original node? Do I use the same settings for the second node as the first regarding Doc_to_Overite, Excel_template, export_folder, filename?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
Ah, that's good news - if you want to generate a second sheet, i'm thinking what you'll need to do is save the document into a PV (in the "Output_document" output variable), then pass that saved document in for both "Excel_base_template" and "Document_to_overwrite" (and this time leave "Document_name_to_create" blank) - if i have that right, that should cause your generated sheet 2 to show stack with your generated sheet 1 -- but i'm less familiar with doing this, so you might need to just play around with it.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benh3891
over 8 years ago
Great, thank you very much it's working. Looks like the only additional hurdle I encountered was that the additional node needed a CDT specified
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
Sweet, glad it worked & thanks for the update. And yes, i suppose the assumption is that each time you use the Export CDT to Excel node, you'd need to plug in the CDT you need to output, as subsequent calls could use different columns or different data within the same CDT, or a different CDT altogether.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel