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
8 replies
Subscribers
4 subscribers
Views
4425 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Export to xlsx file
ravinderl352
over 7 years ago
Hi,
We have a requirement to export database data to the excel (.xlsx) file.
The first column in excel is in "freeze" mode and contains field names. Each row of the db data should go as a column in the excel.
Is there any smart service available to achieve this ?
Attached is the sample file.
Thanks.
OriginalPostID-253002
dummy.xlsx
Discussion posts and replies are publicly visible
0
ankushj
over 7 years ago
You can use the smart service - Export SQL data to Excel from the shared component Excel Tools.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ravinderl352
over 7 years ago
This plugin export data to the rows in the excel, but I am looking to export data in the columns ...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
akshayan
Certified Lead Developer
over 7 years ago
I am not aware of any smart service that can do this. You can transpose the data manually after excel is generated -
support.office.com/.../Transpose-rotate-data-from-rows-to-columns-or-vice-versa-3419f2e3-beab-4318-aae5-d0f862209744
.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
akshayan
Certified Lead Developer
over 7 years ago
May be you can look at writing a SQL query which can transpose the data or use a view which returns the data in a format you need and export it using "Export SQL data to Excel" smart service
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 7 years ago
Hi Ravinder, YOu can achieve this through CDT to Excel Smart Service . create a CDT which mimics your structure present in column 1 (excel attached by you).
Run the Query entity to get all the information from the database.
manually associate the column value to the CDT field value one by one.
Use the Export CDT to Excel Plugin with configurations. Plug in can be downloaded through
forum.appian.com/.../summary
hope this helps !!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 7 years ago
Hi Ravinder, Please ignore above post. I realized that this will not work, overlooked at the requirement. in this case the number of columns are not fixed so it will not work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
subhankarb
over 7 years ago
You may write SQL statements to convert rows to columns and export using "Export SQL data to Excel" smart service.
Example:
oraclecoder.com/.../three-ways-to-transpose-rows-into-columns-in-oracle-sql--160
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Raviteja Varma Jampana
A Score Level 2
over 7 years ago
Hi Ravinder, You can try dynamic pivot tables in SQL for this if number of columns is going to be a small. Please check the link below. However this is not advisable for a growing transaction table because as number grows the query will take long time and it may eventually cause smart service to time out. This one is ideal for lookups.
stackoverflow.com/.../mysql-pivot-row-into-dynamic-number-of-columns
If Number of columns is Big, than it is better to write data into an hidden sheet in excel and use Excel formulas to transponse data into sheets where you want to show it. This approach takes less time to implement and is scalable upto a good extent. Using smart services like SQL to CSV or Excel plugins we can write data into hidden sheets.
Please let me know if you need any help further.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel