Take the following code...
<cfspreadsheet action="read" src="#z.xlsfile#" query="data" headerrow="1" excludeHeaderRow="true" />
<cfoutput>
<!--- Lets replace spaces with $ so they are easy to see --->
<cfloop query="data">
#data["Doc Type"][data.currentrow]# - #replace(data["Doc Type"][data.currentrow],' ','$','all')#<br>
#data["Doc No"][data.currentrow]# - #replace(data["Doc No"][data.currentrow],' ','$','all')#<br>
#data["Doc Rev"][data.currentrow]# - #replace(data["Doc Rev"][data.currentrow],' ','$','all')#<br>
#data["File Name"][data.currentrow]# - #replace(data["File Name"][data.currentrow],' ','$','all')#<br>
<hr>
</cfloop>
</cfoutput>
<cfabort>
The XLS file that is being read has cell data that has leading and trailing spaces. On one ColdFusion server the output shows no spaces as if <cfspreadsheet>
automatically trimmed all the data. On another server it does not. I'm thinking maybe the poi.jar
was changed? Has anyone else experienced this? I haven't been able to find anyone complaining about this.
This ColdFusion server appears to automatically trim the data...
Version: 2016,0,02,299200
Update Level: chf20160002.jar
This one does not...
Version: 10,0,19,298511
Update Level: chf10000019.jar