Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone,

i have two different table data.
i want to show both table data in one excel.
In excel first table data will get displayed ,below that second table data will get displayed.I need a space after first table data.
I use br tag but it cannot give the space between two data.Do anyone know how to solve this problem.
I try this

XML
function getZeroErlangBBHCellGridHtml(dataCollection, filter) {
    debugger;
    var htmlResult = '';
    var tableColumnHeaders, tableDataColumns = '';
    var htmlTable = '';
    tableColumnHeaders = "<tr><th>DATE</th><th>CIRCLE</th><th>TOTALCEELCOUNT</th><th>ZEROERLANGSCELLCOUNT</th><br></tr>";
    tableDataColumns = "<tr><td>{0}</td><td>{1}</td><td>{2}</td><td>{3}</td><br></tr>";
    htmlTable = htmlTable + "<div><table  border=\"1\">";
    htmlTable = htmlTable + tableColumnHeaders
    $.each(dataCollection[0], function (index, nqi2G) {
        debugger;
        htmlTable = htmlTable + tableDataColumns.Stringformat(nqi2G.Date, nqi2G.Circle, nqi2G.TotalCeelCount, nqi2G.ZeroErlangsCellCount);
    });

    var tableColumnHeaders2, tableDataColumns2 = '';
    var htmlTable2 = '';
    tableColumnHeaders2 = "<tr><th><br>DATE</th><th>CIRCLE</th><th>CELLID</th></tr>";
    tableDataColumns2 = "<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>";
    htmlTable2 = htmlTable2 + "<br><div><table  border=\"1\">";
    htmlTable2 = htmlTable2 + tableColumnHeaders2
    $.each(dataCollection[1], function (index, nqi2G) {
        debugger;
        htmlTable2 = htmlTable2 + tableDataColumns2.Stringformat(nqi2G.Date, nqi2G.Circle, nqi2G.CellId);
    });

    htmlResult = htmlTable + htmlTable2 + "</table></div>";
    return htmlResult;
}


Thanks in Advance
Harshal
Posted
Updated 21-Aug-14 22:11pm
v2
Comments
R Harshal 21-Aug-14 6:13am    
Please Team.Kindly revert .Do anyone have any idea for the same.

1 solution

I got it.
i need to change
htmlResult = htmlTable + htmlTable2 + "</table></div>";


Thanks.
Harshal
 
Share this answer
 
Comments
R Harshal 22-Aug-14 5:13am    
please let me know .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900