Copy link to clipboard
Copied
Hi,
I'am formating a table in Indesign with figure in the cell like for example $(123.45) and theres a lot if it. I need to separate or move the $ sign to previous column and the closing parenthesis to the next column. What I do is to insert new column before and after then copy and paste the $ to previous column and the parenthesis to the next. Is there anyone knows to automate this using script.
Thanks,
DennisM
Copy link to clipboard
Copied
dennismacaburas wrote:
I'am formating a table in Indesign with figure in the cell like for example $(123.45) and theres a lot if it. I need to separate or move the $ sign to previous column and the closing parenthesis to the next column. What I do is to insert new column before and after then copy and paste the $ to previous column and the parenthesis to the next. Is there anyone knows to automate this using script.
If your tabel isn't too complicated you can use this workaround:
1) convert table to text with TAB separator
2) replace "^t$(" to "^t$^t("
3) replace ")" to "^t)"
4) convert text to table
But what with "(" ?
Do you want to have this:
$ | (123.45 | )
or
$( | 123.45 | )
robin
www.adobescripts.com
Copy link to clipboard
Copied
Thank you for the reply. This actually works. Another problem that came up. When the following row don't have $ sign the figure was align in the $. My document should look like this in table for you to see.
$ | (1234.45 | )
| 1234.45 |
| (1234.45 | )
$ | 1234.45 |
I hope you help me again in this one.
Thanks,
DennisM
Copy link to clipboard
Copied
hi Dennis,
Could you please attach small screen shoots - before and after ? Just for clarification.
robin
www.adobescripts.com
Copy link to clipboard
Copied
Hi Robin,
Here is the before and after sample table.
Thanks,
Dennis
Copy link to clipboard
Copied
dennismacaburas wrote:
Hi Robin,
Here is the before and after sample table.
I think it should be easy to achieve by GREP - if you have CS3 or CS4.
I'll try to prepare GREP expressions
robin
www.adobescripts.com
Copy link to clipboard
Copied
Ummm.
Why don't you just use a decimal align on those numbers instead of creating all those extra cells?
http://forums.adobe.com/thread/587552?tstart=0
Harbs
Copy link to clipboard
Copied
Harbs. wrote:
Ummm.
Why don't you just use a decimal align on those numbers instead of creating all those extra cells?
Good point But maybe he need to "$", "(" and ")" always at the same place ?
robin
www.adobescripts.com
Copy link to clipboard
Copied
The "$" and the ")" really should be in separate cell.