B
Bill Planey
Hello,
I have a thorny problem that I am hoping for a creative solution to - I have
scripts that convert Word tables to tab-separated text, but because some
cells are (intentionally) left empty in the source document, I need a way to
mark them before they are collapsed so that in their collapsed state there
are not two consecutive tabs left behind, rather, a tab followed by a
placeholder string of my own devising, followed by the second tab. My script
consolidates consecutive tabs into a single tab later (because the vast
majority of consecutive tabs are truly unnecessary). The only way to
properly re-constitute the table that has an intentionally empty cell in a
number column is to mark the cell before hand with a placeholder string.
Sometimes, a cell directly above or below such cells will have a value in
it, so there is the possibility to script something that takes that into
account. But this is not always the case. I suppose a more reliable
scenario would be to check if ANY other cells in the same column have values
in them, which would validate leaving a placeholder in that particular empty
cell.
But what if the column has rows running through it that contain merged
cells? How can you truly automate this if there are so many potential forms
of interference with a clear-cut approach?
I don't know if this newsgroup allows attachments, so I have not included
one. But if requested, I'll post again with a sample table that has a
yellow cell that illustrates my dilemma.
BTW, my solution will be VBA code executed via AppleScript.
Many thanks in advance,
Bill Planey
I have a thorny problem that I am hoping for a creative solution to - I have
scripts that convert Word tables to tab-separated text, but because some
cells are (intentionally) left empty in the source document, I need a way to
mark them before they are collapsed so that in their collapsed state there
are not two consecutive tabs left behind, rather, a tab followed by a
placeholder string of my own devising, followed by the second tab. My script
consolidates consecutive tabs into a single tab later (because the vast
majority of consecutive tabs are truly unnecessary). The only way to
properly re-constitute the table that has an intentionally empty cell in a
number column is to mark the cell before hand with a placeholder string.
Sometimes, a cell directly above or below such cells will have a value in
it, so there is the possibility to script something that takes that into
account. But this is not always the case. I suppose a more reliable
scenario would be to check if ANY other cells in the same column have values
in them, which would validate leaving a placeholder in that particular empty
cell.
But what if the column has rows running through it that contain merged
cells? How can you truly automate this if there are so many potential forms
of interference with a clear-cut approach?
I don't know if this newsgroup allows attachments, so I have not included
one. But if requested, I'll post again with a sample table that has a
yellow cell that illustrates my dilemma.
BTW, my solution will be VBA code executed via AppleScript.
Many thanks in advance,
Bill Planey