简体   繁体   English

是否可以根据相邻单元格的内容删除/修改表单元格中的文本?

[英]Is it possible to remove/modify text in table cells depending on the content of the neighbouring cells?

I'm trying to use Extendscript to conditionally find and replace text within a table cell (in Adobe Framemaker). 我正在尝试使用Extendscript有条件地查找和替换表格单元格中的文本(在Adobe Framemaker中)。 Is it possible to remove data from cells depending on the content of the neighbouring cells of a Framemaker table? 是否可以根据Framemaker表中相邻单元格的内容从单元格中删除数据?

Below is a very basic example of the predicament I have. 以下是我所面临困境的一个非常基本的例子。 I have hundreds of tables that I need to edit. 我有数百个表需要编辑。 They contain data in rows of two as below, and are separated by a black row between each pair. 它们包含的数据以两行的形式如下所示,并且每对之间用黑色行隔开。 The top row always has 2 variations (1 or 2). 第一行始终有2个变体(1或2)。 I want to know if its possible to write a script that will allow me to remove "A" from the cells that have a "2" in the neighbouring cells (immediately above) and retain "A" in all cells with a "1" immediately above. 我想知道是否有可能编写一个脚本,该脚本允许我从相邻单元格(紧邻上方)中具有“ 2”的单元格中删除“ A”,并在所有带有“ 1”的单元格中保留“ A”就在上方。 As clear as mud right? 像泥一样清澈吧? Any help is greatly appreciated, I'm pretty much a total newbie. 非常感谢您的帮助,我几乎是一个新手。

1 1 2 1 1 1 1 1 2 1 1 1

AAAAAA AAAAAA

1 1 1 2 1 2 1 1 1 2 1 2

AAAAAA AAAAAA

Did you post this question in the framemaker forum https://forums.adobe.com/thread/1837006 as well? 您是否也在框架制作者论坛https://forums.adobe.com/thread/1837006中发布了此问题? I see that it has been answered in that forum. 我看到该论坛已经回答了它。 If the answer from that forum worked for you, we can close this question with a reference. 如果该论坛的答案对您有用,我们可以通过参考关闭该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM