Upload Excel with Macros using HTML File Upload

P

Prakash

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.
 
R

Ray at

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
 
P

Prakash

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} 
 
R

Ray at

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top