View Single Post
  #1 (permalink)  
Old July 24th, 2015, 03:03 AM
kishorebiswal kishorebiswal is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Post Export Report into Excel sheet in ASP page

I have a html report in classic asp using javascript and json using db2 connect database. But I want to create a button like export to excel sheet and while clicking on it the report contains details should display in excel sheet format.

pls help on the same.

my current code like
<HTML><HEAD>
<title> -Report</title>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE>THEAD {
BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BACKGROUND: turquoise; BORDER-TOP: 0px; BORDER-RIGHT: 0px; fontWeight: "700"
}
TH {
BACKGRO

<SCRIPT type=text/javascript src="jquery.min.js"></SCRIPT>
<SCRIPT type=text/javascript src="AISServices.js"></SCRIPT>

<SCRIPT language=JavaScript>
....

var mainHeader = .....

var urlCall = IFTAReportServiceURL + param_report + '?date='+ param_date;



$(document).ready(function()
{
// fix for ie 10 - moved this block of code under the ready function
// to make sure the form is loaded before we access form elements
jqxhr = $.getJSON(urlCall, function (data)
{
ReportDataObject=data;
toggleDiv("Waiting");
loadPage();
toggleDiv("DataLoaded");
---
function LoadValues() {

var valrrdd=$("#FSRRDD").val();
..
}
var test=$.grep(ReportDataObject.ReportData.Rows,funct ion(item, i)
{
var retval=false;
var str = item[1]+item[2];
...
}
$("#ReportDisplay").detach();
$("#Results").append(CreateTableView(ReportDataObj ect.ReportData.Header, test));

function CreateTableView(objHeader, objArray) {
--
}

function loadPage()
{

$("#S10").append(ReportDataObject.SearchData.Repor tCode);
$("#S11").append(months[ReportDataObject.SearchData.Month]);
$("#S12").append(ReportDataObject.SearchData.Year) ;
$("#S13").append(ReportDataObject.SearchData.Repor tTimeStamp);
$("#S14").append(ReportDataObject.SearchData.Repor tName);

--

}

like this...

any help on this would be appreciate..