Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to set column sequence as per the columns set on portal while exporting excel /csv from portal ?

Virendra K
Kilo Sage

Hi All,

Per requirement, I need to export xls/csv file from the portal (snap 2) with the CI list listed (snap 1). I am able to export it but excel file is showing by default column sequence , but client is expecting the sequence as per the portal shows (snap1).  There is HTML code written (snap 3)..

 

my ask is, How I could set the column list to the exporting excel file as per the column listed on portal ?

 

snap 1

VirendraKharka_0-1709904491713.png

 

snap 2

VirendraKharka_1-1709904551397.png

 

snap 3

VirendraKharka_2-1709905186850.png

 

@Ankur Bawiskar Please, I seek your help and expertise on this.

 

Thank you,

Virendra

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Virendra K 

the view in your URL is the default view.

so whatever is the column sequence on List Default view, that will come.

You can have a custom list view and add the columns in that sequence as per portal snap

Then in your URL mention view name as that

sysparm_view=myViewName

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Virendra K 

the view in your URL is the default view.

so whatever is the column sequence on List Default view, that will come.

You can have a custom list view and add the columns in that sequence as per portal snap

Then in your URL mention view name as that

sysparm_view=myViewName

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes, You are correct..I created a customize view and as you suggested given the name to the URL..Its working as expected.

Thank you very much.