Tag: ColdFusion8

导出到Excel不能正确显示数字

在将数据从数据库导出到Excel电子表格时,我很难使帐号正确显示。 一家公司的账号正确显示。 但是,其他人不这样做。 用户必须双击单元格才能看到整个帐号。 我已经Google了这个问题,没有我尝试过的解决scheme。 <cfsetting enablecfoutputonly="Yes"> <cfsavecontent variable="sTest"> <cfoutput> <table> <tr><th align="center">ATTUID</th> <th>Company Name</th> <th align="center">Account Number </th> <th align="center">Total Past Due Balance</th> <th align="center">Date Sent</th> </tr> <cfloop query="returnQuery"> <tr><td>#attuid#</td> <td>#companyname#</‌​td> <td>#AccountNum4#‌​</td> <td>#totalpastd‌​ue#</td> <td>#datefor‌​mat(posted)# #timeformat(posted, "h:mm tt")#</td> </tr> </cfloop> </table> </cfoutput> </cfsavecontent> <cfcontent type="application/vnd.msexcel"> <cfheader name="Content-Disposition" value="inline; filename=export.xls"> <cfoutput>#sTest#</cfoutput>