Get a excel report with two tabs or excel worksheets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rinkkunitr
    New Member
    • Oct 2008
    • 1

    Get a excel report with two tabs or excel worksheets

    i have one asp page from where i am calling a xml page.from this xml page i m calling two asp pages to get an excel with two different worksheets. The variable containing a string, having some values like 32,45,57.. My problem is for long string ,(more than 150 characters) it shows error...problem in loading...Pleas e told how to overcome this.... Below is the code of tab.xml page.
    Code:
     Response.ContentType = "application/vnd.ms-excel" 
    <HTML xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">
    
    <HEAD>
    <meta name="Excel Workbook Frameset">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
     <meta content="Excel.Sheet" name="ProgId">
     <meta content="Microsoft Excel 9" name="Generator"> 
    <style>
    </style>
    
    <xml>
       <x:ExcelWorkbook>
        <x:ExcelWorksheets>
    	
      <x:ExcelWorksheet>
          <x:Name>Hours Data</x:Name>
    	<x:WorksheetSource
         HRef="Excel_Case_Hours.asp?Year=<%=strYear%>&LocationIds=<%=strLocationIds%>&SelectedQuarter=<%=strSelectedQuarter%>">
            </x:WorksheetSource>
    	   <x:WorksheetOptions>
           <x:Print>
            <x:ValidPrinterInfo/>
           </x:Print>
          </x:WorksheetOptions>
    	</x:ExcelWorksheet>  
    
    	 <x:ExcelWorksheet>
          <x:Name>Recordable Cases</x:Name>
    	 <x:WorksheetSource HRef="Excel_Case_Rec.asp?Year=<%=strYear%>&LocationIds=<%=strLocationIds%>&SelectedQuarter=<%=strSelectedQuarter%>">
            </x:WorksheetSource>
    	  <x:WorksheetOptions>
           <x:Print>
            <x:ValidPrinterInfo/>
           </x:Print>
          </x:WorksheetOptions>
         </x:ExcelWorksheet>  
    
    	 </x:ExcelWorksheets>
       </x:ExcelWorkbook>
    </xml>
    </HEAD>
    </HTML>
    I got the excel sheets indivisually in separate excel. I used this xml page only to get one excel report with 2 tabs or worksheets.
    So Please help me on that...Thanks.
    Last edited by jhardman; Oct 24 '08, 06:13 PM. Reason: put code in code tags. please note button marked #
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by rinkkunitr
    i have one asp page from where i am calling a xml page.from this xml page i m calling two asp pages to get an excel with two different worksheets. The variable containing a string, having some values like 32,45,57.. My problem is for long string ,(more than 150 characters) it shows error...problem in loading...Pleas e told how to overcome this.... Below is the code of tab.xml page.
    I'm afraid your question isn't very clear. Where is the variable that holds the long string? I didn't see it in your code.

    Jared

    Comment

    Working...