• 07-08-2010, 22:29:27
    #1
    asp olarak yayın yapan e ticaret sitesinden ürün ismi,markası,kategori,altkategori,fiyat,kdv,açı klama,kod,ve resmini excell dosyasına kaydetmek istiyorum.Bu mümkünmüdür?mümkünse yardımcı olabılırmısınız lütfen?
  • 09-08-2010, 12:58:24
    #2
    örneğin aktar.asp dosyasını excel de görmek istediğin şekilde tasarla ve programla sonra aynı sayfaya alttaki kodu ekle. kolay gelsin

    <%
    Response.AddHeader "Content-Disposition", "attachment;filename="dosyaadi.xls"
    Response.ContentType = "application/vnd.ms-excel"
    %>

    dosyaadi.xls - bunu dinamik yapabilirsin
    rs("siparisno")&".xls" gibi
  • 10-08-2010, 15:11:42
    #3
    Üyeliği durduruldu
    Bununla CSV ye aktarırsın kolayca. CSV Den excel'e aktarır kullanıcı.

    Alıntı
    <%
    sub Write_CSV_From_Recordset( RS )

    if RS.EOF then

    exit sub

    end if

    dim RX
    set RX = new RegExp
    RX.Pattern = "\r|\n|,|"""

    dim i
    dim Field
    dim Separator


    Separator = ""
    for i = 0 to RS.Fields.Count - 1
    Field = RS.Fields( i ).Name
    if RX.Test( Field ) then
    '

    Field = """" & Replace( Field, """", """""" ) & """"
    end if
    Response.Write Separator & Field
    Separator = ","
    next
    Response.Write vbNewLine


    do until RS.EOF
    Separator = ""
    for i = 0 to RS.Fields.Count - 1

    Field = RS.Fields( i ).Value & ""
    if RX.Test( Field ) then
    Field = """" & Replace( Field, """", """""" ) & """"
    end if
    Response.Write Separator & Field
    Separator = ","
    next
    Response.Write vbNewLine
    RS.MoveNext
    loop

    end sub


    ' BAĞLANTI NESNELERİ
    Response.AddHeader "Content-Disposition", "attachment;filename=export.csv"

    Write_CSV_From_Recordset objrs %>
    <% end if %>
    <% end if %>