I'm using "Copy document" and "Export Data Store entity to Excel" smart services in a process model to generate a excel sheet. While the sheet is generated when the contents are displayed, the cells don't fit to the width of the contents within them. In excel we can generally expand according to the width of the contents by selecting all rows and columns and double clicking in the middle of any two columns. But that is after generating the file. So, I want this columns to be auto adjusted or expanded while generating itself. how do I make this happen?
Now,
How I need it to be,
Thanks,
Shravan
Discussion posts and replies are publicly visible
Yes, as Stefan mentioned it is not possible to adjust the column width or any alignments in Appian, there would be limited options. You might need to do that after download the file.
is there any smart service where i can preset the width of the columns?
Actually I have done what you are trying to do. I'm assuming you are using a template in Export DSE to excel node since you mentioned that you are using Copy document SS too. So what you can do is, you can word wrap or set the width for required columns in the template document and it will persist in the new generated document as well
I have tried setting the column width in the template document. After doing that for me, when I download the sheet it comes appropriately expanded but when other users try the same they have one or two columns distorted. So im not understanding why is the behaviour of the sheet not uniform for different users
Never seen that kind of disparity.
ShravanS said:After doing that for me, when I download the sheet it comes appropriately expanded but when other users try the same they have one or two columns distorted.
Then my first guess is you're using a different smart service (or maybe, using a spreadsheet viewer that auto-expands columns somehow, though I don't know of such a thing). But either way, the "Export DSE to Excel" smart service absolutely does not support base templates or pre-formatting of any sort, sadly, and will completely overwrite anything that exists in the excel sheet beforehand should you try to have it update an existing document.
You might be thinking of the older (and, if we're honest, better) Excel Tools smart services, either "Export SQL to Excel" or "Export CDT to Excel", both of which accept a Base Template Document, and which will preserve original formatting from their template files (at least other than inside the contents of individual cells, which I believe are still overwritten).
I generated the below excel file using a excel template in which there is only a single row with header name for some columns and color and also column size for first column was increased and it preserved all these things in that generated file.
Generated document:-
Test document4_19_2023 4_14 PM GMT+05_30.xlsx
Template document:-
Test document (2).xlsx
You used "Export DSE to Excel" to get this? If so, how did you feed it the template file?
It's been a while since I've bothered to test it - but the last time I did, *every single thing* in the targeted sheet was overwritten, including column widths, etc. I still consider it 100% unacceptable that they didn't provide a way to have it consume (and not overwrite) a base template file.
Yes.
It's there, you can provide it in Document to Update input parameter. The only disgusting thing is that it creates new version of the same document and that's why Copy document SS come in handy.
Unknown said:you can provide it in Document to Update input parameter
Yeah, which is of course 100% unacceptable (when it comes to being the *only* method of providing additional updates to an existing file). There is absolutely no excuse for forcing us to use Copy Document prior to running this node if we want to simulate the "base template" experience, which was provided OOB in "Export CDT to Excel" and "Export SQL to Excel" in the Excel Tools plug-in, etc.
But yes, in all my previous tests, 100% of the contents of the target worksheet were overwritten (as far as i remember), so it looks as if they've at least improved upon that aspect. It's probably been a few Appian Versions since I last tested it, so I assume they may have snuck in some improvements they didn't mention.
Mike Schmitt said:There is absolutely no excuse for forcing us to use Copy Document prior to running this node
Totally agree with that, they should provide the similar functionality for this node too.
Mike Schmitt said: 100% of the contents of the target worksheet were overwritten
Yes I have heard this from you on some other thread also but yeah seems like they did some fixes/improvements around that part.