views:

700

answers:

2

I'm generating an excel in ruby which each line represents the results of an nmap scan.

An example of a line could look like that: ip, yes (because port is 22 open), no (because port 80 is not open), etc.

I would like to be able to create a header line with a drop down list for each port that allow me to select if that port is open or not.

So i can filter my results to see for example all hosts that have both port 22 and 80 open.

Is there a way to do that with WIN32OLE.new("Excel.Application")? (or something else; html would be better because Linux does not support win32ole).

+1  A: 

I would initially suggest creating a CSV file and exporting to Excel, but you seem to require something more sophisticated.

Would something like this work: http://rubyonwindows.blogspot.com/search/label/excel?updated-max=2007-03-31T11%3A16%3A00-05%3A00&max-results=20 ?

pschneider
A: 

After more research I haven't found any solution to create a drop down list in excel with Ruby. The workaround I used was to create a excel template (with the drop down list) and fill it up with Ruby.

Benjamin
What library did you use to fill up the excel spreadsheet? Any issues with different versions of excel?
Chris Mo