Export To Excel

Hello all,
we have created one Adhoc CDT[the type is list of dictionaries] ,when we pass the list of dictionary data the export CDT to excel smart service is return an error,
I want to know any other way to generate excel file with adhoc CDT data? ,
For cdt list data[getting data from db using query rule] the smart service working fine .
Example Adhoc CDT :
{{username:"test" , lastname:"user",username:"tuser",fullName:"testuser"}}

Thanks In Advance.

OriginalPostID-255025

  Discussion posts and replies are publicly visible

Parents
  • One more option is like using "Cell_Keys" and "Cell_Values" inputs of the Export Excel smart services, in your case "Cell_Keys" should be generated dynamically.
    Suppose I have 3 process variables pv1={1,2,3},pv2={"abc","lmn","xyz"} and pv3={1000,2000,3000}(in your case dictionary data) and now if you want to export these process variables data to excel file without using CDT, then you have to give cell keys like {"A1","A2","A3","B1","B2","B3","C1","C2","C3"} in the "Cell_Keys" section and have to give pvs {pv1,pv2,pv3} in the "Cell_values" section.But here I have given static Cell keys because I know the length of each pv.
    In your case you have to write an expression rule in such a way that it takes length of the each pvs as inputs and generate Cell keys based on the length of the each pv dynamically.

    Just like this, pv1={1,2,3,4,5}, pv2={"a","b","c","d","e"},pv3={100,200,300,400} then your rule should return keys like {A1,A2,A3,A4,A5,B1,B2,B3,B4,B5,C1,C2,C3,C4} in text array, observe I have given 4 vaues in pv3 and generated 4 keys for the third column.

    Hope this reference will help you to go with your requirement without using CDT.

    Thank you.
Reply
  • One more option is like using "Cell_Keys" and "Cell_Values" inputs of the Export Excel smart services, in your case "Cell_Keys" should be generated dynamically.
    Suppose I have 3 process variables pv1={1,2,3},pv2={"abc","lmn","xyz"} and pv3={1000,2000,3000}(in your case dictionary data) and now if you want to export these process variables data to excel file without using CDT, then you have to give cell keys like {"A1","A2","A3","B1","B2","B3","C1","C2","C3"} in the "Cell_Keys" section and have to give pvs {pv1,pv2,pv3} in the "Cell_values" section.But here I have given static Cell keys because I know the length of each pv.
    In your case you have to write an expression rule in such a way that it takes length of the each pvs as inputs and generate Cell keys based on the length of the each pv dynamically.

    Just like this, pv1={1,2,3,4,5}, pv2={"a","b","c","d","e"},pv3={100,200,300,400} then your rule should return keys like {A1,A2,A3,A4,A5,B1,B2,B3,B4,B5,C1,C2,C3,C4} in text array, observe I have given 4 vaues in pv3 and generated 4 keys for the third column.

    Hope this reference will help you to go with your requirement without using CDT.

    Thank you.
Children
No Data