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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...