Hey Jongware,
Thanks for your response.
I've got to say I'm getting hooked on this scripting. Before I made this document I have never used it before. Suddenly my script palette is filling up and I can make text-heavy documents in no time at all.
I updated the script as discussed above. The document didn't crash, but the cells didn't delete either. I did get a spinning beachball for a minute or so, suggesting it was doing something, but no real results I can see.
Here is a screen shot of the cells:
.png)
I can remove the cells with content like “Email: ” by searching for those via the following script. You will notice that the 'empty cell has a placeholder which is an empty Cell from excel. Is there a way I can search for that expression in GREP? I am not sure how to express it in GREP though:
// JavaScript Document
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = “Email:s+Z“;
empties = app.activeDocument.findGrep(true);
for (i = 0; i < empties.length; i++)
if (empties[i].parent instanceof Cell)
empties[i].parent.parentRow.remove();
Do you know how I can change the expression for the values that appear in the empty cells?
Thanks in advance, really appreciate your help.