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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...