FMIS Project Size Date Last Modified
Total Number of Pages: 1
1 \FMIS\FMIS.cfm 11557 13/06/2002 11:10


[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => SpiderFromMars [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 9 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> <cfcontent> deletefile parameter problem - Coldfusion - Advanced Techniques

<cfcontent> deletefile parameter problem - Coldfusion - Advanced Techniques

I am using cfheader and cfcontent to deliver a dynamically generated excel doent to the browser. On delivery of the excel doent I want to delete it from the server using the cfcontent tags deletefile parameter, but whenever I add that paramater and set it to yes, I am receiving the following error (embedded in the excel doent). 'Error occurred while attempting to delete the file C:\Inetpub\wwwroot\asa\administration\members\memb er_lists\MbrList_050415.xls.' Here is my code: ------------------------------------------------------------------- ..query getting data... ... using <cffile.. to create .xls doent.... .. then outputing with <cfheader name='Content-Disposition' value='filename=#FileName#'> <cfcontent type='application/unknown' file='#FileLocation##FileName#' deletefile='Yes'> ------------------------------------------------------------------- Any suggestions on why I ...

  1. #1

    Default <cfcontent> deletefile parameter problem

    I am using cfheader and cfcontent to deliver a dynamically generated excel
    doent to the browser. On delivery of the excel doent I want to delete it
    from the server using the cfcontent tags deletefile parameter, but whenever I
    add that paramater and set it to yes, I am receiving the following error
    (embedded in the excel doent). 'Error occurred while attempting to delete
    the file
    C:\Inetpub\wwwroot\asa\administration\members\memb er_lists\MbrList_050415.xls.'
    Here is my code:
    ------------------------------------------------------------------- ..query
    getting data... ... using <cffile.. to create .xls doent.... .. then
    outputing with <cfheader name='Content-Disposition'
    value='filename=#FileName#'> <cfcontent type='application/unknown'
    file='#FileLocation##FileName#' deletefile='Yes'>
    ------------------------------------------------------------------- Any
    suggestions on why I might be getting this error ?? Many thanks in advance.

    jjay@aus Guest

  2. #2

    Default Re: <cfcontent> deletefile parameter problem

    I'm Getting the SAME EXACT problem. And it's a recent problem. Could it be a
    hot fix that was updated to windows 2000 server?

    it works a while on reboot, and then just starts giving that error again. NT
    ERROR 5 and cannot delete the file after
    the CFCONTENT is displayed.

    What a pain. Some macromedia help would be nice!

    mratner Guest

  3. #3

    Default Re: <cfcontent> deletefile parameter problem

    Hi There, I would be very interested in learning how to use CFFILE/CFCONTENT
    to create/display an EXCEL doent. Would you mind sharing the code? The way
    that I create XLS sheets now is by: 1) Writing comma seperated values to a
    file using CFFILE 2) Use CFLOCATION or JavaScript to open the file created by
    merely using the filename. I've never had any problems using this technique,
    but I would like to learn how you are using it and what the pitfalls are of
    doing it the way that I have been.... Kind Regards, Peter

    SpiderFromMars Guest

  4. #4

    Default Re: <cfcontent> deletefile parameter problem

    Hi Peter, I have gone back to using cflocation as well. I just had too many
    problems with cfcontent (see my other topic I posted after this one). What I
    do do differentl to you however is when creating the file, I use HTML to create
    doent (using cffile) and save it directly with a .xls extension. This
    allows for greater control over the formatting of headings etc.. Again, check
    out the other topic I posted after this one to see a code sample.

    jjay@aus Guest

  5. #5

    Default Re: <cfcontent> deletefile parameter problem

    Very interesting code. So, if you save it as EXCEL, it is apparent that <TD>'s
    are counted as columns and <TR>'s act as rows. I'll give this a try and see
    how it comes out... the only difference is that I'll use CFLOCATION vice
    CFHEADER.... <cfheader name='Content-Disposition' value='inline;
    filename=File.xls'> <cfcontent type='application/unknown'> <table
    border=1><tr><td><b>Member
    No.</b></td><td><b>Category</b></td><td><b>Name</b></td><td><b>Address
    1</b></td><td><b>Address 2</b></td><td><b>Address
    3</b></td><td><b>City</b></td><td><b>State</b></td><td><b>Postcode</b></td><td><
    b>Country</b></td></tr> <cfoutput query='Members'>
    <tr><td>#member_number#</td><td>#description#</td><td>#name#</td><td>#address_1
    #</td><td>#address_2#</td><td>#address_3#</td><td>#address_city#</td><td>#addres
    s_state#</td><td>#address_postcode#</td><td>#address_country#</td></tr>
    </cfoutput> </table>

    SpiderFromMars Guest

  6. #6

    Default Re: <cfcontent> deletefile parameter problem

    That's right. You can also use a lot of other HTML Formatting such as <b> tags
    and styles. A good way to get styles is to open an excel doent, style it
    how you like it and then view the source for the excel doent (save as a .txt
    and open n notepad or something) and pull out the style code to then use when
    writing your file.

    jjay@aus Guest

  7. #7

    Default Re: <cfcontent> deletefile parameter problem

    I have a problem with the delete parameter. I set to 'Yes' and it
    doesn't delete the file.
    I have seen 'application/unknown' used for the cfcontent type
    parameter.
    Some of the information I have come across besides unknown and
    specifically related to Excel applications also uses the following:
    vnd.ms-excel x-mcel ms-excel mcel and x-excel

    Where can I find out what the differences are between these values?
    Is my problem even related to the type parameter?

    My Code follows:
    <cfcontent type="application/vnd.ms-excel"
    File="#newTemplate#"
    deletefile = "YES">

    Thanks!

    michael.manganelli@citigroup.com Guest

  8. #8

    Default Re: <cfcontent> deletefile parameter problem

    I have a problem with the delete parameter. I set to 'Yes' and it
    doesn't delete the file.
    I have seen 'application/unknown' used for the cfcontent type
    parameter.
    Some of the information I have come across besides unknown and
    specifically related to Excel applications also uses the following:
    vnd.ms-excel x-mcel ms-excel mcel and x-excel

    Where can I find out what the differences are between these values?
    Is my problem even related to the type parameter?

    My Code follows:
    <cfcontent type="application/vnd.ms-excel"
    File="#newTemplate#"
    deletefile = "YES">

    Thanks!

    michael.manganelli@citigroup.com Guest

  9. #9

    Default Re: <cfcontent> deletefile parameter problem

    Hi Jjayaus,

    I've been playing with saving HTML files out with XLS extensions and have been
    having a brilliant time.

    But, I am having problems with background colors that maybe you can help me
    with.

    Can you please take a minute to check out this code and open it in EXCEL?

    You'll see (hopefully) that the blue background goes all the way across the
    spreadsheet and does not keep itself in the cells that have content.

    How can I change the HTML to get the blue background color to stay where it
    logically should be staying.

    Thanks for any help you can give me...
    Peter

    ---------The Code -------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; cht=iso-8859-1">
    <title>TOPIC Page Modification Report</title>

    <style type="text/css">
    <!--

    table {
    border: 1px solid #000000;
    }

    td {
    border: 1px solid #000000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }

    th {
    border: 1px solid #000000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    }
    -->
    </style>

    </head>
    <body>
    <table width="660px">

    <tr bgcolor="33CCFF" style="font-size: 16px; font-weight: bold;">

    <td colspan="2">FMIS Project</td>

    <td>Size</td>

    <td>Date Last Modified</td>

    </tr>

    <tr bgcolor="33CCFF" style="font-size: 16px; font-weight: bold;">

    <td colspan="4">

    Total Number of Pages: 1

    </td>

    </tr>

    <tr>

    <td>1</td>

    <td>\FMIS\FMIS.cfm</td>

    <td>11557</td>

    <td>13/06/2002 11:10</td>

    </tr>

    </table>

    <br><br>

    </body>

    </html>





    SpiderFromMars Guest

  10. #10

    Default Re: <cfcontent> deletefile parameter problem

    Hi Peter, try specifying the bgcolor for each cell rather than the row (see
    code below). You could probably do it with styles as well, but as exel is a
    microsoft product it will probably be some long convoluted 300 char style
    setting.
    This way is probably the easiest.

    Cheers

    ----------------------------

    <table width="660px">

    <tr style="font-size: 16px; font-weight: bold;">
    <td bgcolor="33CCFF" colspan="2">FMIS Project</td>
    <td bgcolor="33CCFF">Size</td>
    <td bgcolor="33CCFF">Date Last Modified</td>
    </tr>

    <tr style="font-size: 16px; font-weight: bold;">
    <td bgcolor="33CCFF" colspan="4">
    Total Number of Pages: 1
    </td>
    </tr>

    <tr>
    <td>1</td>
    <td>\FMIS\FMIS.cfm</td>
    <td>11557</td>
    <td>13/06/2002 11:10</td>
    </tr>

    </table>



    jjay@aus Guest

  11. #11

    Default Re: <cfcontent> deletefile parameter problem

    That worked perfectly! Thank you!!

    It was all a matter of doing it at the cell level... not the row level.

    Then there was much rejoicing.... yey!!

    Peter
    SpiderFromMars Guest

Similar Threads

  1. problem downloading using CFCONTENT & CFHEADER
    By gumnam in forum Coldfusion Flash Integration
    Replies: 0
    Last Post: September 21st, 04:10 PM
  2. Problem using cfcontent to view files??
    By rhileyrmax in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: July 13th, 03:11 AM
  3. cfcontent problem
    By alternative in forum Coldfusion - Advanced Techniques
    Replies: 10
    Last Post: June 2nd, 10:49 PM
  4. cfcontent filename problem
    By amiller in forum Macromedia ColdFusion
    Replies: 2
    Last Post: May 12th, 08:34 PM
  5. DateFormat and cfcontent problem
    By dmx1999 in forum Macromedia ColdFusion
    Replies: 5
    Last Post: May 9th, 08:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •