Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > excel file attachment

Reply
Thread Tools

excel file attachment

 
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      08-18-2005
Hi,

i have problem in attaching excel file and store into sqldatabase.
have any ideas?

I'm totally new to this ability.

your help will be appreciated.
thank you.

Bset regards,
Gin Lye Khor
 
Reply With Quote
 
 
 
 
Paul Clement
Guest
Posts: n/a
 
      08-18-2005
On Thu, 18 Aug 2005 02:46:42 -0700, Daniel <(E-Mail Removed)> wrote:

Hi,

i have problem in attaching excel file and store into sqldatabase.
have any ideas?

I'm totally new to this ability.

your help will be appreciated.
thank you.

See the following:

http://www.codeproject.com/aspnet/fileupload.asp
http://steveorr.net/Articles/EasyUploads.aspx


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RWx0b24gVw==?=
Guest
Posts: n/a
 
      08-18-2005
Hi Daniel,

If you want to save data in the excel file, please look at following URL:
http://msdn.microsoft.com/library/de...ntodataset.asp

Or if you want to save the excel file to DB, take look at
http://support.microsoft.com/default...b;en-us;326502

HTH

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)



"Daniel" wrote:

> Hi,
>
> i have problem in attaching excel file and store into sqldatabase.
> have any ideas?
>
> I'm totally new to this ability.
>
> your help will be appreciated.
> thank you.
>
> Bset regards,
> Gin Lye Khor

 
Reply With Quote
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      08-18-2005
Hi All,
thanks for ur response.

Now i know how to upload the file(excel format) but i have problem download
the file and view it(excel format).

after i save the file/ try to view the file(excel format) from sqldatabase,
the file already corrupted.

Here is my code:
Function GetFile()

Dim PROD_CONNEC As SqlConnection = New
SqlConnection("Server=gl;uid=LBPCOS;pwd=new1;datab ase=DB")
Dim PROD_CMD As SqlCommand = New SqlCommand("wla_getfile",
PROD_CONNEC)
Dim PROD_DR As SqlDataReader

PROD_CMD.CommandType = CommandType.StoredProcedure

Dim PRM_CP As New SqlParameter("@Attachment_ID", SqlDbType.Int)
PRM_CP.Value = CInt("1")
PROD_CMD.Parameters.Add(PRM_CP)

PROD_CONNEC.Open()
PROD_DR = PROD_CMD.ExecuteReader


If PROD_DR.Read Then
Response.ContentType = PROD_DR("Contenttype").ToString
Response.OutputStream.Write(CType(PROD_DR("Filedat a"), Byte()),
0, CInt(PROD_DR("Filesize")))
Response.AddHeader("Content-Disposition", "attachment;filename="
+ PROD_DR("Filename").ToString())
Else
Response.Write("File Not Found.")
End If

PROD_CONNEC.Close()

End Function

Any ideas? I already out of ideas.
thank you.

best regards,
GL

"Paul Clement" wrote:

> On Thu, 18 Aug 2005 02:46:42 -0700, Daniel <(E-Mail Removed)> wrote:
>
> ¤ Hi,
> ¤
> ¤ i have problem in attaching excel file and store into sqldatabase.
> ¤ have any ideas?
> ¤
> ¤ I'm totally new to this ability.
> ¤
> ¤ your help will be appreciated.
> ¤ thank you.
>
> See the following:
>
> http://www.codeproject.com/aspnet/fileupload.asp
> http://steveorr.net/Articles/EasyUploads.aspx
>
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatically adding an Excel attachment gregarican Ruby 1 01-16-2009 03:30 PM
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
Trying to send Excel attachment; the operation failed due to network or other communication problems Edward Computer Support 5 03-24-2007 10:52 PM
ExtenXLS loads data into Excel 2002 file but damages the Excel file. kp2900@gmail.com Java 1 11-21-2006 05:48 PM
exporting an excel file from database; making changes to excel file and updating the database by importing it back Luis Esteban Valencia ASP .Net 1 01-12-2005 12:28 AM



Advertisments