Explorateur de texte: exportation du résultat "show text" surligné en ms word ou pdf
Chère communauté,
Existe-t-il un moyen d’exporter les résultats affichés sur l’image (affichage du texte des termes / phrases choisis) vers un format word ou pdf en conservant la fonction "surbrillance du texte" comme sur l’image? Un JSL serait parfait.

Re: explorateur de texte: exportation du résultat "show text" surligné en ms word ou pdfhtml = "";
wordlist = {"room", "food", "staff", "clean"};
color = {"FFFF00", "00FFFF", "00FF00", "C0C0FF"};
For Each Row(
html = html || "<H3 id="toc-hId-1420607172">" || Titles || "</H3>"; // H1 or H2 is even bolder
rowtext = Reviews; // rowtext will be modified in the loop to add the color
for( iWord=1,iWord<=nitems(wordlist),iWord++, // each word, one at a time
rowtext = regex(
rowtext, // input to regex
"\!\b("||wordlist[iWord]||")\!\b", // find a word with word boundaries on each side
"<SPAN style="background-color: #"||color[iWord]||"">\1</SPAN>", // \1 is the word
IgnoreCase, GlobalReplace) // match food or Food, and multiple occurrences
);
html = html || rowtext || "<BR /><BR />"; // append each story and some blank lines
);
// add minimal HTML around the doc
html = ""||html||"";
// save and display
filename = savetextfile("$temp/deleteme.html", html);
open(filename);Re: explorateur de texte: exportation du résultat "show text" surligné en ms word ou pdfMerci, c'est une solution sûre mais le niveau de JSL est tellement élevé pour moi. Puis-je demander d'adapter le script du tableau ci-joint pour les mots "chambre", "nourriture", "personnel" "propre"? A partir de là, je suppose que je peux le faire pour ma table. Merci beaucoup d'avance
Re: explorateur de texte: exportation du résultat "show text" surligné en ms word ou pdfJe suis presque sûr que la fenêtre "Afficher le texte" de l'explorateur de texte ne peut pas enregistrer la coloration. Vous pouvez écrire du JSL pour obtenir l’effet:
docs = "Text for Words: brown fox
the quick brown fox jumped over the lazy dogs back [1]
quick brown dog [2]
lazy fox jumped [3]
brown the lazy fox [5]";
// pick out the list of special words
wordlist = words(regex(docs,"Text for Words:(.*?)[\!n\!r]","\1")); // {"brown", "fox"}
// insert html into the documents to color the words
color={"FFFF00","00FFFF","00FF00","8080FF"};
for( iWord=1,iWord<=nitems(wordlist),iWord++,
docs = regex( docs, "\!\b("||wordlist[iWord]||")\!\b", "<SPAN style="background-color: #"||color[iWord]||"">\1</SPAN>", GLOBALREPLACE)
);
// insert breaks for newlines
docs = regex(docs,"[\n\r]","<BR />",GLOBALREPLACE);
// add minimal HTML around the doc
docs = ""||docs||"";
// save and display
filename = savetextfile("$temp/deleteme.html", docs);
open(filename);
HTML formaté avec des mots surlignés
Re: explorateur de texte: exportation du résultat "show text" surligné en ms word ou pdfVous seriez ouvert à une sorte de capture d'écran, puis copiez-collez-le pour un correctif à court terme. Il existe Windows Snipping Tool qui est gratuit et Snagit est une autre option, mais qui a un coût associé. Vous pouvez utiliser ces outils pour sélectionner uniquement la partie de l'image souhaitée, puis copier et coller dans un document selon les besoins.
HTH