class Excel *---------------------------------------------------------------------* * Athor : Patrick Bower * Date Written : 2nd March 2005 * Version : 01.40 27/08/07 *---------------------------------------------------------------------* subroutine addCSVLine( - %valueList is longString, - %typeList is longString default(''), - %styleList is longString default(''), - %delimiter is string len 1 default(',')) %cellValue is longString %cellType is String len 8 %cellStyle is String len 7 %workString is longString %workStyle is longString %workType is longString %index is float %indexType is float %indexStyle is float %workString = %valueList %workType = %typeList %workStyle = %styleList %index = $index(%workString,%delimiter) %indexType = $index(%workType,%delimiter) %indexStyle = $index(%workStyle,%delimiter) repeat while %index %cellValue = $substr(%workString,1,%index-1) %cellType = $substr(%workType,1,%indexType-1) %cellStyle = $substr(%workStyle,1,%indexStyle-1) if %cellType = '' then %cellType = 'String' end if %this:addRowElement(%cellValue,%cellType,%cellStyle) %workString = $substr(%workString,%index+1) %workType = $substr(%workType,%indexType+1) %workStyle = $substr(%workStyle,%indexStyle+1) %index = $index(%workString,%delimiter) %indexType = $index(%workType,%delimiter) %indexStyle = $index(%workStyle,%delimiter) end repeat end subroutine addCSVLine end class