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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...