SUBROUTINE CloseOutputTabularFile
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN July 2003
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Create a file that holds the output from the tabular reports
! the output is in a CSV file if it is comma delimited otherwise
! it is in a TXT file.
! METHODOLOGY EMPLOYED:
! Uses get input structure similar to other objects
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: fmta="(A)"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: iStyle
IF (WriteTabularFiles) THEN
DO iStyle = 1, numStyles
! if HTML file put ending info
IF (tableStyle(iStyle) .eq. tableStyleHTML) THEN
WRITE(TabularOutputFile(iStyle),fmta) '</body>'
WRITE(TabularOutputFile(iStyle),fmta) '</html>'
ELSEIF (tableStyle(iStyle) .eq. tableStyleXML) THEN
IF (LEN_TRIM(prevReportName) .NE. 0) THEN
WRITE(TabularOutputFile(iStyle),fmta) '</' // TRIM(prevReportName) //'>' !close the last element if it was used.
END IF
WRITE(TabularOutputFile(iStyle),fmta) '</EnergyPlusTabularReports>'
END IF
CLOSE(TabularOutputFile(iStyle))
END DO
END IF
END SUBROUTINE CloseOutputTabularFile