Reporting

Sendemail changing column order

sscandoit
Explorer

Hi,

I am using sendemail command in my search to send results as CSV file. I read the following post which states that prior to version 4.1.4 sendemail orders the results as per column length.

link:Define field order on export

I replaced the generateHTMLResults with the code from sendemail.py from 4.2 version which doesn't sort the columns. However this didn't work.

Can you please tell me how can I display the columns same as given in table command?

Thanks

Suvelee

Tags (2)
0 Karma

aminobtata
New Member

Hi,

I have the same problem :
When I use stats or chart function in splunk my columns displayed in the good order. But if I export the result to CSV sometimes the columns order change.

Please if someone know how to force columns order when using OPTION "-output csv" in search command.
How did you fix it !

Best Regard

0 Karma

aminobtata
New Member

Hi,

I have the same problem :
When I use stats or chart function in splunk my columns displayed in the good order. But if I export the result to CSV sometimes the columns order change.

Please if someone know how to force columns order when using OPTION "-output csv" in search command.
How did you fix it !

Best Regard

0 Karma

fk319
Builder

right before your sendmail command, try using 'fields <field_list>'

0 Karma

sscandoit
Explorer

Thanks for the reply. Tried using fields as you suggested, but that didn't work.

0 Karma
Get Updates on the Splunk Community!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...