Video Screencast Help

Trick to export customized reports from Symantec endpoint Manager

Created: 25 Nov 2009 • Updated: 25 Nov 2009 | 11 comments
Language Translations
Rafeeq's picture
+13 13 Votes
Login to vote

Hello All,

I would like to give you a trick to export a report from SEPM.
While exporting the reports the reports gets saved in .txt format we need to change that to .csv
save it, open with excel and here lot of columns but we are interested in just few say , computername, ip address, virus defs, infected or not.

If I need just four of the above, then I need to follow the above said procedure -  delete all unnecessary columns and then get the required data.

The above said procedure is simple if we need to create a report once a month. But what if i need to create the same kind of reports everday and send it to my Boss?

Here is the trick to get customized reports and save time.

Before you procede with the trick ,please take a back up of export_inventory.php under
C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Inetpub\Reporting\Inventory
copy it in a safe place, if anything goes wrong we just need to replace the original file.

when you click on the export, SEPM queries the export_inventory.php file which is under

C:\Program Files\Symantec\Symantec Endpoint Protection Manager\Inetpub\Reporting\Inventory

This is the file which tells SEPM what to query in the DB and what type the output should be.

Files inside Reporting folder are ready only , so to edit these file we need to uncheck the read only option so that we can make some changes to it.

Right click on export_Inventory.php and click on properties and uncheck read only.

Open the file with a notepad

now look for the below line


the line says that by default it will export the reports to .txt format, since we are interested in .csv
we need to change the extension, once changed the line would look like


Hereafter the output format will always come in .csv format by default

Now for the customized report we need to select the Data fields

below the


you will find $data value

just delete or comment whatever you dont need and keep the onces you require (use // to comment a line the entire line will be ignored)

For example I need computername, ip address, virus defs, infected or not

so the values in the data fields would be

 $data =


   $data = str_replace( array("\n","\r") , "" , $data )."\r\n";
Now we have selected the Colums of our interest.We need to insert data inside these colums. The data value is inserted by $string. function.

use // to comment a line these lines will be ignored by the query.

Do not comment these lines because all the query are inside a while function.


 while ($zeile = sav_fetch_array($result)) {
         $string =


 for the above 4 columns I would comment everything leaving these four indide the $string .fuction Note that computer name, ip address, patterndate, column infected are in order, if you change the sequence data will swapped so keep these lines in order.the order should match with $data value


              $data = str_replace( array("\n","\r") , "" , $string )."\r\n";

Thats it, !!! we are good to go now, save the file try to export  a report the type will be .csv automatically with only 4 fields as mentioned above

Hope this was helpful, I have attached a modified export_inventory.txt file so that you can check what lines to be commented and what not.

Comments 11 CommentsJump to latest comment

Vikram Kumar-SAV to SEP's picture

 Great Finding !!!

Vikram Kumar

Symantec Consultant

The most helpful part of entire Symantec connect is the Search use it.

Login to vote
Prashant Nair's picture

Good one .. 

Just A thought :

How about  Creating a batch file to make changes in the Xcel sheet rather than changing the PHP ,because if in case you need full report later you have to change the PHP inventory file again manually .



We are the difference between vulnerable and protected.

Login to vote
Rafeeq's picture

@Prashant working on that will update you soon, thanks for the input.

Login to vote
AravindKM's picture

Nice information.. 

Please don't forget to mark your thread solved with whatever answer helped you : ) Thanks & Regards Aravind

Login to vote
Fatih Teke's picture

thank you for good tricks

 Everything works better when everything works together.

Login to vote
Subhani's picture

Thanks Rafeeq. I tried this but it somehow did not work for me . I do get the required data but I also get some repeated data which keeps on decreasing itself in a loop .I have matched my PHP file with your file and every thing is same except that I have asked for few more colums but it is not working .Let me know how can I upload  my file and the resultant reply if you want to check.

Login to vote
Ajit Jha's picture

Really a good one. Had no idea we could do this


Ajit Jha

Technical Consultant


Login to vote
MadTheory's picture

Great find.  It has helped me save alot of time.  Two things I want to add:

With the release of 11.0.6, the syntax has change slightly:

Instead of  $be->start("computer_status_export.txt");
it looks like

Changing txt to csv has the same effect though.

Also I would like to add that you can do the same thing with the Firewall logs.

Program Files\Symantec\Symantec Endpoint Protection Manager\Inetpub\Reporting\Firewall\export_firewall.php is the file to edit.
$be->start(rawurlencode(I18nFirewall::translateFirewall("FIREWALL_REPORT")).".txt"); is the line to edit.

Login to vote
mon_raralio's picture

Is it possible to change the separator symbol from a comma to something else. Like a semi-colon.

“Your most unhappy customers are your greatest source of learning.”

Login to vote
Jack_B's picture

mon_raralio, search in export_inventory.php for string "sep".

You'll find:

$sep = ",";

Just change the line to:

$sep = ";";

Login to vote
yaduvanshi S's picture

Hi Rafeeq,

Thanks fro sharing awesome trick but i am not able to do it in latest version sep 12.1.5 RU5

can you explain how to achive this in latest version 

i want to export 

it like computrer status export-->client inventory details 

Login to vote