uchicago.src.sim.analysis
Class ExcelFileWriter

java.lang.Object
  extended by uchicago.src.sim.analysis.ExcelFileWriter
All Implemented Interfaces:
BlockFileWriter

public class ExcelFileWriter
extends java.lang.Object
implements BlockFileWriter

Writes network data to ExcelFiles. This is extremely slow and ASCII writing (which is suitable for importing into excel should be used instead. The data is written with a file header (model properties etc.) any block header info (dynamic properties, tick count) and then the actual network data. The network data format is identical to the excel format imported and exported by UCINet. Labels are recorded on the row and column above and preceding the data. The data itself begins in the second row and col cell.


Constructor Summary
ExcelFileWriter(java.lang.String fileName, DataFileHeader dfHeader)
          Constructs a new ExcelFileWriter to write to the specified file with the specified DataFileHeader.
 
Method Summary
 void close()
          Closes the writer.
 void setBlockHeader(java.lang.String blockHeader)
          Sets the block header for subsequent writes.
 void writeToFile(java.lang.Object o)
          Writes the specified object (an AjacencyMatrix) to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelFileWriter

public ExcelFileWriter(java.lang.String fileName,
                       DataFileHeader dfHeader)
Constructs a new ExcelFileWriter to write to the specified file with the specified DataFileHeader.

Parameters:
fileName - the name of the file to write to.
dfHeader - the DataFileHeader for this file.
Method Detail

setBlockHeader

public void setBlockHeader(java.lang.String blockHeader)
Sets the block header for subsequent writes.

Specified by:
setBlockHeader in interface BlockFileWriter
Parameters:
blockHeader - the block header

writeToFile

public void writeToFile(java.lang.Object o)
Writes the specified object (an AjacencyMatrix) to the file. The file header and any block header information will be written if necessary.

Specified by:
writeToFile in interface BlockFileWriter
Parameters:
o - the AdjacencyMatrix to write to the Excel file

close

public void close()
Closes the writer.