Problem with downloaded files - the headers are not shown

Problem with downloaded files - the headers are not shown

kulig15kulig15 Posts: 1Questions: 0Answers: 0
edited March 2014 in TableTools
Hello!
I have a problem with downloaded files like csv, pdf etc. In those files there is no header, for example file looks like:

"","","","","","",""
"aaaaaaaa","0","0","56495","bbbbbb","12312312323","SA"
"12312312323","0","0","56495","XR",SDJA123","SA"
"12312312323","0","0","56495","XRY","SDJA123","SA"
"12312312323","0","0","56495","XR25","SDJA123","SA"
"W1","0","0","","","W1","PH"

I am generating dynamically headers in js so it may be a problem? I hope that You will help me with this issue.

There is my code:
[code]


var link='http://localhost/tables/myjson.json
var tab = [];

//*******************[GETTING WHOLE VALUES FROM JSON]*************


$.ajax({
url: link,
success: function(data) {
window.save = "window.jsonread = "+data;
eval(window.save);
var jObj = (window.jsonread.aaData[0]);
var i = 0;
for (var key in jObj) {
tab[i] = key;
i++;
}

//*********************[RECORD GENERATION]***********


$(document).ready(function() {
var columns = [];
for (var k=0;k

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin
    Can you please link to a test case, showing the problem, as required in the forum rules.

    Allan
This discussion has been closed.