Export multiple worksheet to excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prinsipe
    New Member
    • Jun 2007
    • 14

    Export multiple worksheet to excel

    Hi guys,

    i'm able to export data to an excel from my asp .net page, i can even create multiple worksheets. the problem is, i can not specify where worksheet should the data be placed. below is my sample code...

    response.Conten tType = "applicatio n/vnd.ms-excel"

    <xml><x:ExcelWo rkbook> <x:ExcelWorkshe ets><x:ExcelWor ksheet><x:Name> "Worksheet1 "</x:Name>
    <x:WorksheetOpt ions><x:Print>< x:ValidPrinterI nfo/></x:Print><x:Sele cted/><x:DoNotDispla yGridlines/></x:WorksheetOpti ons>
    </x:ExcelWorkshee t>
    <x:ExcelWorkshe et><x:Name>Work sheet2</x:Name><x:Works heetOptions><x: Print><x:ValidP rinterInfo/></x:Print><x:Sele cted/><x:DoNotDispla yGridlines/></x:WorksheetOpti ons></x:ExcelWorkshee t></x:ExcelWorkshee ts>
    </x:ExcelWorkbook >

    any help will be greatly appreciated. thanks!
  • aliasruel
    New Member
    • Sep 2007
    • 73

    #2
    Hi,

    You may consider the code below. Enjoy!

    Response.Append Header("content-disposition", "attachment ; filename=" + "Doc1.xls")
    ' Set MIME type to Excel.
    Response.Conten tType = "applicatio n/octet-stream"

    regards,
    ruel





    Originally posted by prinsipe
    Hi guys,


    i'm able to export data to an excel from my asp .net page, i can even create multiple worksheets. the problem is, i can not specify where worksheet should the data be placed. below is my sample code...

    response.Conten tType = "applicatio n/vnd.ms-excel"

    <xml><x:ExcelWo rkbook> <x:ExcelWorkshe ets><x:ExcelWor ksheet><x:Name> "Worksheet1 "</x:Name>
    <x:WorksheetOpt ions><x:Print>< x:ValidPrinterI nfo/></x:Print><x:Sele cted/><x:DoNotDispla yGridlines/></x:WorksheetOpti ons>
    </x:ExcelWorkshee t>
    <x:ExcelWorkshe et><x:Name>Work sheet2</x:Name><x:Works heetOptions><x: Print><x:ValidP rinterInfo/></x:Print><x:Sele cted/><x:DoNotDispla yGridlines/></x:WorksheetOpti ons></x:ExcelWorkshee t></x:ExcelWorkshee ts>
    </x:ExcelWorkbook >

    any help will be greatly appreciated. thanks!

    Comment

    • prinsipe
      New Member
      • Jun 2007
      • 14

      #3
      hehe...tried searching on how to implement this on export then directing the data to other worksheet but have no luck of finding one that can help me. do you any resource material or link that i can check? thanks for your reply =)


      Originally posted by aliasruel
      Hi,

      You may consider the code below. Enjoy!

      Response.Append Header("content-disposition", "attachment ; filename=" + "Doc1.xls")
      ' Set MIME type to Excel.
      Response.Conten tType = "applicatio n/octet-stream"

      regards,
      ruel

      Comment

      Working...