Upload Excel with Macros using HTML File Upload

Discussion in 'ASP General' started by Prakash, Nov 7, 2003.

  1. Prakash

    Prakash Guest


    We face problems uploading excel (with macros) documents using HTML
    File Upload.
    The file contents are corrupted while viewing the same. However, we
    are able to upload excel (w/o. macros) documents successfully. Is
    there anything we have to take care of, while handling uploads of
    excel documents with macros?

    Thanks in advance,
    Prakash, Nov 7, 2003
    1. Advertisements

  2. Prakash

    Ray at Guest

    What is it that tells you that the files are corrupted? Whether or not the
    workbook has macros should have no effect on the upload. It's just a file
    like anything else.

    Ray at work
    Ray at, Nov 7, 2003
    1. Advertisements

  3. Prakash

    Prakash Guest


    Thanks for ur reply. We came to know that the file is corrupted on
    viewing the same. The contents were completely destroyed and it was
    like this:

    These are the steps followed by us:
    We retrieve the file contents from the html file upload control like
    where filFile is the name of the file control. Then we pass this to
    the method of a COM component where it is saved using Binary access.

    Open strFileName For Output As lngFileNumber
    Print #lngFileNumber, strFileContents;
    Close #lngFileNumber

    where strFileContents contains the File contents retrieved from HTML
    file control. Are we missing anything in this? However, we were able
    to upload and view other excel documents successfully.

    Another query is:
    Is there any security setting in IE which prevents macros files to
    change like these while uploading. If so, how to tackle this?


    COURTESY RESPONSE #0application/vnd.ms-excelÐÏࡱá>þÿ >þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

    Entryÿÿÿÿÿÿÿÿ ÀFàa¶4¥Ã?¬
    "WorkbookÿÿÿÿÿÿÿÿÑu_VBA_PROJECT_CUR" °£sxé¢Ã
    ܬxé¢ÃVBAÿÿÿÿÿÿÿÿ°vxé¢ÃP:Sxé¢Ã FÍɬ á°Áâ\pPrakash

    B°aÀ=Óº ThisWorkbookS¯¼=x<L;$8X@"·Ú1ÈÿArial1ÈÿArial1ÈÿArial1ÈÿArial1Èÿ¼Arial1
    QTahoma1 Q¼Tahoma1 ÿTahoma1 ÿ¼Arial1
    QTahoma1 ÿArial1È Arial1È$Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"*
    #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(*
    \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"*
    \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(*
    \(#,##0.00\);_(* "-"??_);_(@_)¤"Yes";"Yes";"No"¥"True";"True";"False"¦"On";"On";"Off"
    §00000àõÿ À àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ
    ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ à À
    à+õÿ øÀ à)õÿ øÀ à,õÿ øÀ à*õÿ øÀ à
    ôÿôÀ à ôÿôÀ à õÿ øÀ à À à À à"À à  @À à @À à
    À à  @ À à À à À à @À à!À à (@@À à"°@À
    à"°À à"À à ¬ À à  (@À à"0@À à"0À à  (@À à (À À à
    À À à"À à"8@À à *À à *8À à 8@@À à(À à!8@@À
    à @
    à @
    à H

     ÷üîE&Vendor / Work Center(Lot Date / Revision Level / Order
    numberSuspected defectScrapReworkSortQA Hold
    Requested by:Part Number(s)Date:WIP DispositionRework
    Information:WC to Rework / SortWork Center ResponsibilityShop Order
    Number Comments:Special Inspection/Actions:QAID #!Other pages
    attached as required.Actions for Inventory(requires
    Volume sorted
    Volume PassedVolume Scrapped!Description & Picture (if needed)GTest /
    Measurement Method &/or Description (if additional space
    needed)Result:OriginOtherInventory Comments Use as is
    Contain at WCStop ProductionStop cust. Shipments
    Contact Cust.Vendor Comment FieldRoutingÿ*é p '©ÌeÆ
    FÍɬ   h <ê!r(J*
     dü©ñÒMbP?_*+ ¬ %ÿÁ96&L&"Arial,Bold"&14RMQD
    Sheet&C&"Arial,Bold"&12QAP-1017&R&"Arial,Bold"&11 11/27/02'
    && ëQ¸Õ?'®Gáz®×?(à?)Ð?MHP LaserJet 5PÔ@göú
    ,,@MSUDHP LaserJet 5Pä<d
    ¡"d,,Ð?Ð?ÝcÌU} I} I} 
    Prakash, Nov 11, 2003
  4. Prakash

    Ray at Guest

    I'm not vb expert, so you may want to post to a VB group, but if you're
    writing a binary file, shouldn't you do:

    open strFilename for BINARY as #1
    put #1, strFilecontents
    Close #1

    Ray at home
    Ray at, Nov 12, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.