07-13-2016 06:50 AM
Hello,
The query is related to Excel sorting using Report Generation Toolkit.
Initially I'm writing the values in three columns continuously. Once the while loop is stops the third column (C) should be arranged in ascending order and the depending columns 1 & 2 also change accordingly.
Please find the enclosed .Zip file and help me to solve the issue.
Regards,
S Nagaraju
Solved! Go to Solution.
07-13-2016 07:12 AM
Its better to collect all the data in an array and then sort the values (Ascending order) then write into the excel which will solve your problem in an easy way
07-13-2016 09:15 AM
I think you are using the RGT for Excel "the hard way". Here's a suggestion -- in the Search box on the Forum, type the word "Revised " (don't type the quotation marks, but do put the space after it). Go to the "Obvious choice" and read what I wrote several years ago about using the RGT for Excel.
One difference is that I strongly recommend the Excel Easy Table functions instead of Append Report Text. Among other things, it will allow you to keep numeric data as numbers (which facilitates sorting). If you want to Sort, use Excel Sort Data (found on the Excel Advanced Palette). Note that these Excel-specific functions use the Position cluster directly -- you don't have to unbundle the MS Parameter cluster to get it. There are also two functions to convert between Excel "A1" addresses and Excel Row/Column indices (e.g. B1 = row 0, column 1).
Bob Schor
07-14-2016 01:01 AM
Hello Palanivel,
As you mentioned sorting 1D array is easy way but my data is 2D array. Based on Third column (in Ascending order) remaining columns also adjusted accordingly.
For example:
Input data:
1.2 2.6 3.12
6.2 2.9 17.8
0.6 3.4 2.04
8.1 2.29 23.49
Output data: should be in this format
0.6 3.4 2.04
1.2 2.6 3.12
6.2 2.9 17.8
8.1 2.29 23.49
Help me to implement this one in programmatically.
Regards,
S Nagaraju
07-14-2016 01:06 AM
Hello Bob Schor,
Thank you very much for your suggestions.
I will try those changes.
Regards,
S Nagaraju