Connecting Tech Pros Worldwide Forums | Help | Site Map

Get a excel report with two tabs or excel worksheets

Newbie
 
Join Date: Oct 2008
Posts: 1
#1: Oct 23 '08
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...Please told how to overcome this.... Below is the code of tab.xml page.
Expand|Select|Wrap|Line Numbers
  1.  Response.ContentType = "application/vnd.ms-excel" 
  2. <HTML xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">
  3.  
  4. <HEAD>
  5. <meta name="Excel Workbook Frameset">
  6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7.  <meta content="Excel.Sheet" name="ProgId">
  8.  <meta content="Microsoft Excel 9" name="Generator"> 
  9. <style>
  10. </style>
  11.  
  12. <xml>
  13.    <x:ExcelWorkbook>
  14.     <x:ExcelWorksheets>
  15.  
  16.   <x:ExcelWorksheet>
  17.       <x:Name>Hours Data</x:Name>
  18.     <x:WorksheetSource
  19.      HRef="Excel_Case_Hours.asp?Year=<%=strYear%>&LocationIds=<%=strLocationIds%>&SelectedQuarter=<%=strSelectedQuarter%>">
  20.         </x:WorksheetSource>
  21.        <x:WorksheetOptions>
  22.        <x:Print>
  23.         <x:ValidPrinterInfo/>
  24.        </x:Print>
  25.       </x:WorksheetOptions>
  26.     </x:ExcelWorksheet>  
  27.  
  28.      <x:ExcelWorksheet>
  29.       <x:Name>Recordable Cases</x:Name>
  30.      <x:WorksheetSource HRef="Excel_Case_Rec.asp?Year=<%=strYear%>&LocationIds=<%=strLocationIds%>&SelectedQuarter=<%=strSelectedQuarter%>">
  31.         </x:WorksheetSource>
  32.       <x:WorksheetOptions>
  33.        <x:Print>
  34.         <x:ValidPrinterInfo/>
  35.        </x:Print>
  36.       </x:WorksheetOptions>
  37.      </x:ExcelWorksheet>  
  38.  
  39.      </x:ExcelWorksheets>
  40.    </x:ExcelWorkbook>
  41. </xml>
  42. </HEAD>
  43. </HTML>
  44.  
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.

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: Oct 24 '08

re: Get a excel report with two tabs or excel worksheets


Quote:

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...Please 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
Reply