Reporting

Why is the search some digit of number when exporting to CSV?

chakuttha
Explorer

Dear All,

  Please help to recommend  when i export  result to CSV  field work id if number start with 0
it not show when open in csv files   as capture screen below,

chakuttha_0-1666182943394.png

 

chakuttha_1-1666182970134.png

If i would like to change format before export to csv it possible? 

 

Best Regards,

CR

 

Labels (1)
Tags (2)
0 Karma
1 Solution

FrankVl
Ultra Champion

That's not a Splunk problem, that's an excel problem. If you open the csv in a text editor you should see the leading 0's are included in the csv as exported by Splunk. Forcing the value to be wrapped in double quotes also won't fix this behavior (I just tested this).

You need to handle this in your excel import, to treat that column as text rather than number.

View solution in original post

chakuttha
Explorer

Thank you so much.

0 Karma

FrankVl
Ultra Champion

That's not a Splunk problem, that's an excel problem. If you open the csv in a text editor you should see the leading 0's are included in the csv as exported by Splunk. Forcing the value to be wrapped in double quotes also won't fix this behavior (I just tested this).

You need to handle this in your excel import, to treat that column as text rather than number.

richgalloway
SplunkTrust
SplunkTrust

If you put quotation marks around the WORK_ID field the leading zeroes will be preserved in the CSV.  So, too, will the quotation marks so you will need to remove those.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...