I have beaten this by using XML format for the Excel workbook. If you want to see what it looks like, go into Excel and save the spreadsheet as XML. If you create that format, then you are golden.
I will try to post the Sort cards I used, but they may not make sense:
OUTFIL FTOV,OUTREC=(C' <Row>',/,
C' <Cell><Data ss:Type="String">',
002,002,C'</Data></Cell>',/, county
C' <Cell><Data ss:Type="String">',
007,006,C'</Data></Cell>',/, workerid
C' <Cell><Data ss:Type="String">',
016,015,C'</Data></Cell>',/, name last
C' <Cell><Data ss:Type="String">',
034,015,C'</Data></Cell>',/, name first
C' <Cell><Data ss:Type="String">',
052,001,C'</Data></Cell>',/, name mi
C' <Cell><Data ss:Type="String">',
056,012,C'</Data></Cell>',/, indv
.
.
.
REMOVECC,
HEADER1=(C'<?xml version="1.0"?>'/,
C'<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"',/,
C'xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" >',/,
C' <Worksheet ss:Name="Put a nice name for the sheet here">',/,
C' <Table>',/,
C' <Row>',/,
C' <Cell><Data ss:Type="String">County</Data></Cell>',/,
C' <Cell><Data ss:Type="String">Worker</Data></Cell>',/,
C' <Cell><Data ss:Type="String">Last Name</Data></Cell>',/,
C' <Cell><Data ss:Type="String">First Name</Data></Cell>',/,
C' <Cell><Data ss:Type="String">MI</Data></Cell>',/,
C' <Cell><Data ss:Type="String">Individual</Data></Cell>',/,
.
.
.
C' </Row>'),
TRAILER1=(C' </Table>',/,
C' </Worksheet>',/,
C'</Workbook>')
In a nutshell, it takes a flat file and builds an XML from it. In my example the "Individual" field is a twelve byte number that was doing exactly what you are describing. When we did this format, that problem went away.
Yes, I know it's clever, and will do exactly what you need, but don't gush...it's embarrassing.