2 Replies Latest reply on Aug 6, 2013 6:31 AM by zadi1

    Applying formatting to query values using CFSPREADSHEET

    zadi1 Level 1

      I'm trying to figure out how to properly apply my custom border line formatting to my query values only on an automated report. Currently, I have it where it is hard coded, but long term it would not work since new values will be added to the database and the report query values would be generated without the border line formatting, unless I manually change the row numbers everytime.

       

      Here's the formatting I'm using:

       

          format4.topborder="thin";

          format4.topbordercolor="grey_40_percent";

          format4.bottomborder="thin";

          format4.bottombordercolor="grey_40_percent";

          format4.leftborder="thin";

          format4.leftbordercolor="grey_40_percent";

          format4.rightborder="thin";

          format4.rightbordercolor="grey_40_percent";

          SpreadsheetFormatCellRange(report,format4, 2,1,26,8);

        • 1. Re: Applying formatting to query values using CFSPREADSHEET
          Donald Baert Level 1

          Have you tried setting a variable equal to the number of records you are pulling from the database?  I have done that in several cfspreadsheets and it works as good as setting a counter counting the number off loops through the data.

          • 2. Re: Applying formatting to query values using CFSPREADSHEET
            zadi1 Level 1

            Excellent Suggestion! Here's what I ended up doing:

             

            <cfset custCount ="#getCustinfo.recordcount#" + 1 />

             

                format4.topborder="thin";

                format4.topbordercolor="grey_40_percent";

                format4.bottomborder="thin";

                format4.bottombordercolor="grey_40_percent";

                format4.leftborder="thin";

                format4.leftbordercolor="grey_40_percent";

                format4.rightborder="thin";

                format4.rightbordercolor="grey_40_percent";

                SpreadsheetFormatCellRange(report,format4, 2,1,"#custCount#",8);

             

            Thanks a bunch!