Upload Excel with Macros using HTML File Upload

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

  1. Prakash

    Prakash Guest

    Hi,

    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.
     
    Prakash, Nov 7, 2003
    #1
    1. Advertising

  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

    "Prakash" <> wrote in message
    news:...
    > Hi,
    >
    > 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.
     
    Ray at, Nov 7, 2003
    #2
    1. Advertising

  3. Prakash

    Prakash Guest

    Hi,

    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
    this:
    Form("filFile")("Value")
    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?


    Thanks.
    Prakash.

    THIS WAS THE PART OF CONTENT WE FOUND ON OPENING THE EXCEL FILE:
    ===============================================================
    COURTESY RESPONSE #0application/vnd.ms-excelÐÏࡱá>þÿ >þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿ=

     !"#$%&'()*+,-./0123456789:;<þÿÿÿGQ@ABCDEFHPIJKLMNORþÿÿÿþÿÿÿSþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot
    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
    explanation)Vendor
    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} 






    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<>...
    > 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
    >
    > "Prakash" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > 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.
     
    Prakash, Nov 11, 2003
    #3
  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

    "Prakash" <> wrote in message
    news:...
    > Hi,
    >
    > 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
    > this:
    > Form("filFile")("Value")
    > 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
    >
     
    Ray at, Nov 12, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    80
    Views:
    2,431
    Stephen J. Bevan
    Nov 7, 2003
  2. Replies:
    1
    Views:
    448
    Marco Antoniotti
    Oct 7, 2003
  3. Replies:
    5
    Views:
    497
  4. Michael T. Babcock

    Re: Explanation of macros; Haskell macros

    Michael T. Babcock, Nov 3, 2003, in forum: Python
    Replies:
    0
    Views:
    517
    Michael T. Babcock
    Nov 3, 2003
  5. Andrew Arro

    macros-loop? calling macros X times?

    Andrew Arro, Jul 23, 2004, in forum: C Programming
    Replies:
    2
    Views:
    495
    S.Tobias
    Jul 24, 2004
Loading...

Share This Page