0 Replies Latest reply on Oct 26, 2015 7:55 AM by brendanparker

    How to preserve blank cells when exporting database

    brendanparker Level 1

      Hi CF forum,

       

      I am VERY new to CF and I am working with a script which exports a database to an .xls file. It all works fine, but what I noticed is that in SOME cells (not all), it seems to skip over some of the data so I get this effect:

       

      DIETSPECIAL_NEEDTICKETCOSTID
      noneRegular502A19B7EF
      noneRegular50392DDDDF
      noneRegular508C6F0EA1
      noneRegular5094A9CF7D
      noneRegular5094AB5198
      noneRegular5094B987B8
      noneRegulardontemail5094C439D1
      noneRegular50

      94C99CA9

       

      As you can see, my "dontemail" field seems to have skewed my table. This is data which doesn'tappear in all fields, but has a table name of "dontemail"which doesn't come through. It looks fine in the database, so all the data is where it's supposed to be, but it doesn't show up right on the export.

       

      Here's the code which generates this:

      <cfoutput>DATE/TIME ENTERED<cfloop list="#rsdata.fieldList#" index="c">#DelimChar##c#</cfloop>#NewLine#</cfoutput><cfoutput query="rsData"><cfsilent><cfwddx action="wddx2cfml" input="#rsdata.data#" output="info"></cfsilent>#rsdata.entered#<cfloop list="#rsdata.fieldList#" index="f">#DelimChar##fixDelim(info['#f#'])#</cfloop>#NewLine#</cfoutput><cfabort>

       

      Any ideas?

       

      Thanks,

      Brendan