Skip to main content
Participant
July 20, 2010
Question

Using SpreadsheetFormatRows

  • July 20, 2010
  • 1 reply
  • 875 views

I am using cfspreadsheet to generate the spreadsheets from Database. Recently i came up with a need to generate a Excel file having option to filter data by colums.

I have searched and found below code:

    format1-SructNew() 
    format1.font="Courier";
    format1.fontsize="10";
    format1.color="dark_blue;";
    format1.italic="true";
    format1.bold="true";
    format1.alignment="left";
    format1.textwrap="true";
    format1.fgcolor="pale_blue";
    format1.bottomborder="dotted";
    format1.bottombordercolor="blue_grey";
    format1.leftborder="thick";
    format1.leftbordercolor="blue_grey";
    format1.rightborder="thick";
    format1.rightbordercolor="blue_grey";
    SpreadsheetFormatRows(theSheet,format1,"1-5");

which is very cool. But its not allowing me to generate any excel with filter option....

i have already tried these:

format1.filter = "true"; and format1.filter="ALL"; 

Any way to reach this or is this is a limitation in SpreadsheetFormatRows

--
Rahul
    This topic has been closed for replies.

    1 reply

    Inspiring
    July 27, 2010

    I believe the spreadsheet functions are implemented with POI.  A search of the POI user list suggests it does not support "auto filters".  So my guess would be the CF spreadsheet functions do not support it either.

    http://old.nabble.com/Auto-Filter-to28991981.html#a28991981

    Inspiring
    August 16, 2010

    As luck would have it, they just added a "basic" auto filter to the latest version of POI.

    http://apache-poi.1045710.n5.nabble.com/Re-Auto-Filter-td2386945.html#a2386945

    If you really needed the feature, you could give the latest version of POI a whirl with the javaLoader and a wee bit of java code.

    http://poi.apache.org/spreadsheet/quick-guide.html#Autofilter

    Participant
    August 17, 2010

    Hey..thanks alot...yes this is what i was needed.