Question

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).

Was it helpful?

Solution 2

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.

OTHER TIPS

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 ?

Old question but in case anyone else finds this one, there's a couple of ruby gems that could be used for this at the moment.

For creation/parsing of Excel spreadsheets from ruby there's RubyXL and for the parsing for nmap XML files there's nmap-parser

You can create a data validation list using gem axlsx. Example here: github.com/randym/axlsx/blob/master/examples/data_validation.rb

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top