To export an item out of a SharePoint DispForm you can use the following javascript function.
function Export() { var table = $("table[class='ms-formtable']"); var replacer = new RegExp("<BR>","g"); var nbspReplacer = new RegExp(" ","g"); var xls = new ActiveXObject("Excel.Application") xls.visible = true var xlsBook = xls.Workbooks.Add countRow = 2; countColumn = 1; xls.columns("A").columnwidth=40; xls.columns("B").columnwidth=60; xls.columns("B").WrapText = true; xls.columns("A").verticalAlignment = -4160; xls.columns("B").verticalAlignment = -4160; xls.Cells( 1, 1).interior.colorindex=44; xls.Cells( 1, 2).interior.colorindex=44; xls.Cells( 1, 2).Value = "GG-Zwischenfall"; xls.Cells( 1, 2).font.name="Arial"; xls.Cells( 1, 2).font.size=10; xls.Cells( 1, 2).font.bold=true; xls.Cells( 1, 2).borders(10).LineStyle = 1; xls.Cells( 1, 2).borders(10).Weight = -4138; xls.Cells( 1, 2).borders(10).ColorIndex = -4105; xls.Cells( 1, 1).borders(7).LineStyle = 1; xls.Cells( 1, 1).borders(7).Weight = -4138; xls.Cells( 1, 1).borders(7).ColorIndex = -4105; xls.Cells( 1, 2).borders(8).LineStyle = 1; xls.Cells( 1, 2).borders(8).Weight = -4138; xls.Cells( 1, 2).borders(8).ColorIndex = -4105; xls.Cells( 1, 1).borders(8).LineStyle = 1; xls.Cells( 1, 1).borders(8).Weight = -4138; xls.Cells( 1, 1).borders(8).ColorIndex = -4105; xlsBook.activeSheet.pageSetup.Zoom = false; xlsBook.activeSheet.pageSetup.FitToPagesWide = 1; xlsBook.activeSheet.pageSetup.FitToPagesTall = 1; var aufgestellt = false; $(table).children('TBODY').children('TR').each(function() { var tr = $(this); tr.find('TD').each(function() { //xls.Cells( countRow, countColumn).Value = unescape($(this).text()); if (countColumn < 3) { var html = $(this).html(); var text = $(this).text(); if (html.indexOf("<DIV>") != -1 && text != "" && html.indexOf("<BR>") != -1) { var htmlValue = $(this).children('DIV').html(); var textValue = $(this).children('DIV').text(); //alert(textValue); if (htmlValue != "" && htmlValue.indexOf("<DIV>") == -1) { //alert(htmlValue); htmlValue = htmlValue.replace(replacer,"\n"); htmlValue = htmlValue.replace(nbspReplacer," "); xls.Cells( countRow, countColumn).Value = unescape(htmlValue); } else { var divTextValue = ""; $(this).children('DIV').children('DIV').each(function() { //alert ($(this).text()); divTextValue = divTextValue + $(this).html().replace(replacer,"\n"); }); divTextValue = divTextValue.replace(nbspReplacer," "); xls.Cells( countRow, countColumn).Value = unescape(divTextValue); } } else { if (html.indexOf("<DIV>") != -1 && text != "" && html.indexOf("<BR>") == -1) { if ($(this).children('DIV').find("DIV").length > 0) { var divTextValue = ""; $(this).children('DIV').children('DIV').each(function() { //alert ($(this).text()); divTextValue = divTextValue + $(this).text() + "\n"; }); divTextValue = divTextValue.replace(new RegExp("\n" + '$'), ''); divTextValue = divTextValue.replace(nbspReplacer," "); xls.Cells( countRow, countColumn).Value = unescape(divTextValue); } else { xls.Cells( countRow, countColumn).Value = unescape($(this).text()); } } else { xls.Cells( countRow, countColumn).Value = unescape($(this).text()); } } //xls.Cells( countRow, countColumn).Value = $(this).html(); if (countColumn == 1) { xls.Cells( countRow, countColumn).font.bold="true"; xls.Cells( countRow, countColumn).borders(7).LineStyle = 1; xls.Cells( countRow, countColumn).borders(7).Weight = -4138; xls.Cells( countRow, countColumn).borders(7).ColorIndex = -4105; } else { xls.Cells( countRow, countColumn).interior.colorindex=19; xls.Cells( countRow, countColumn).borders(10).LineStyle = 1; xls.Cells( countRow, countColumn).borders(10).Weight = -4138; xls.Cells( countRow, countColumn).borders(10).ColorIndex = -4105; } xls.Cells( countRow, countColumn).borders(8).LineStyle = 1; xls.Cells( countRow, countColumn).borders(8).Weight = -4138; xls.Cells( countRow, countColumn).borders(8).ColorIndex = 15; xls.Cells( countRow, countColumn).borders(9).LineStyle = 1; xls.Cells( countRow, countColumn).borders(9).Weight = -4138; xls.Cells( countRow, countColumn).borders(9).ColorIndex = 15; xls.Cells( countRow, countColumn).font.name="Tahoma"; xls.Cells( countRow, countColumn).font.size=8; } countColumn++; }); countRow++; countColumn = 1; }); $("td[class='ms-descriptiontext']").each(function() { xls.Cells( countRow, 1).Value = $(this).text(); xls.Cells( countRow, 1).font.name="Tahoma"; xls.Cells( countRow, 1).font.size=8; xls.Cells( countRow, 2).borders(10).LineStyle = 1; xls.Cells( countRow, 2).borders(10).Weight = -4138; xls.Cells( countRow, 2).borders(10).ColorIndex = -4105; xls.Cells( countRow, 1).borders(7).LineStyle = 1; xls.Cells( countRow, 1).borders(7).Weight = -4138; xls.Cells( countRow, 1).borders(7).ColorIndex = -4105; countRow++; }); xls.Cells( countRow, 2).borders(10).LineStyle = 1; xls.Cells( countRow, 2).borders(10).Weight = -4138; xls.Cells( countRow, 2).borders(10).ColorIndex = -4105; xls.Cells( countRow, 1).borders(9).LineStyle = 1; xls.Cells( countRow, 1).borders(9).Weight = -4138; xls.Cells( countRow, 1).borders(9).ColorIndex = -4105; xls.Cells( countRow, 2).borders(9).LineStyle = 1; xls.Cells( countRow, 2).borders(9).Weight = -4138; xls.Cells( countRow, 2).borders(9).ColorIndex = -4105; xls.Cells( countRow, 1).borders(7).LineStyle = 1; xls.Cells( countRow, 1).borders(7).Weight = -4138; xls.Cells( countRow, 1).borders(7).ColorIndex = -4105; xls.Cells( countRow-1, 1).Value = ""; //xls.columns.autofit; }