Discussion Thread
Data Extractor
Message Thread

Extract any data, including email addresses and URLs from your files and webpages.
Posted in the Data Extractor Forum.
?2 All to row script
//Table Extraction
var tables = document.all.tags('TABLE');
var rows;
var cells;
var rowc;
var rglobal=0;
var maxCells = 1;
if (tables) {
DataExtractor.StartNewResult();
for (var t=0; ttables.length; t++) {
rows = tables[t].all.tags('TR');
if (tables[t].all.tags('TABLE').length == 0) {
for (var r=0; rrows.length; r++)
{
if (rows[r].innerText != '')
{
rglobal++;
cells = rows[r].all.tags('TD');
rowc = '';
if (rglobal maxCells)
{
maxCells = rglobal;
DataExtractor.SetColumns(maxCells);
DataExtractor.AddHeader(rglobal, 'Cell ' + rglobal);
}
for (var c=0; ccells.length; c++)
{
rowc = rowc + cells[c].innerText + ' ';
}
DataExtractor.AddResult(rglobal+1, rowc);
}
}
}
}
}
?2 All to row script
Thanks for posting, but please note that our forum strips out "less than" and "greater than" symbols, so in some of the "for" loops they need to be added back in again.
| |