All Apps and Add-ons

How can I tell xls2csv command to ignore the first x number of rows?

jedatt01
Builder

I have some excel workbooks where the column header is on row 7. How can I tell xls2csv to ignore the first 6 rows and start writing the cvs with headers on row 7?

0 Karma

woodcock
Esteemed Legend

Is this really necessary? Probably ending like this will work:

... | xls2csv MyFileName | where ThisFieldDoesNotExist="So this will drop all events" | inputcsv MyFileName | streamstats count AS serial | search searial >=7 | fields - serial | outputcsv MyFileName
0 Karma

jedatt01
Builder

I see what you are getting at with this. My end goal is to injest the csv's into Splunk. One additional question. Is there a way to make the command pick up all xls files in the /var/run/Splunk directory instead of one by one with explicitly stating the file name?

0 Karma

dominiquevocat
SplunkTrust
SplunkTrust

Nope, not currently. Um, i never needed that but it would be possible to either do a custom command listing all files and modify the xls2csv to accept a prior search result with a list of paths/filenames and process them as a stream.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...