How to make the empty last table row disappear in pdfmake?I don't want to use dontBreakRows because I need text to break to next page if it overflows.
?
Related
I have a table in a sheet.tabledata were I have insert certain data. Im using a for next statament to loop the elements of the table (and based on these values the code copy and paste from the table the address and tel number to that particular sheet)
I want to store in a variable the number of times that the for next statment loop in one sheet.
Because I want to create a condition that test:
nroftimessofsheets(sheet1) (which is 2 in this example, and I need to create a vairable to store this number) = v_nrofForLoopinginsheet (number of times that the for statment loop in that particular sheet, the second variable that I need)
In order, when the two variables are equal, I will instruct the code to do a particultar job before jumping to the next page.
Thanks
I need to print a PDF output for each name in the page field list (highlighted in the image below). It shouldn't be the best approach, but I thought I'd get the list with all the available names and go filtering with a vba loop.
For Each Item In pvt.PivotFields("[LANC].[NAME].[NAME]").VisibleItemsList
Debug.Print Item
Next
The problem that only works by selecting n-1 from the n elements in the list. If you select all, the field is set to "all" and VisibleItemsList returns an empty element.
I am currently trying to automate some data formatting. The source data is formatted in Excel. The inDesign template is already formatted. I can right click the table and select body rows then paste the data and it looks beautiful. I am looking to remove this step but am unable to figure out how to get applescript to select the table and body rows of the inDesign template.
Neither of the following seem to work.
set selection to body rows of table 1 of active document
select body rows of table 1 of active document
Any help on this would be great.
Unfortunately the select command only works for a single row, and not all of the rows in a selected table.
Essentially, you must go row by and decide the row type. Once you've decided the row is a body row, you can select it.
The syntax for adding a selected row to another selected row is super tricky, especially without an example. See the complete script below.
tell application "Adobe InDesign CC 2015"
set allBodyRows to every row of every table of every story of active document whose row type is body row
set bodyRow to {}
repeat with i from 1 to (count allBodyRows)
set bodyRow to item i of allBodyRows
if i = 1 then
select bodyRow
else
select bodyRow existing selection add to
end if
end repeat
end tell
I think you need to reference your table differently. Try this:
set allTables to every table of every story of active document
set myTable to item 1 of allTables
Then you should be able to select rows:
tell table myTable
select first row
end tell
--author by RyuAutodidacte
tell application "Adobe InDesign 2020"
tell active document
--When the selection is a text frame
set FirstBodyCell to index of first cell of table 1 of selection whose row type is body row
set LastBodyCell to index of last cell of table 1 of selection whose row type is body row
select cells FirstBodyCell thru LastBodyCell of table 1 of selection
end tell
end tell
I am developing macro in which i am expecting string such as (present in text file):
QUALAPP#QUALAPPC#GENRESOUS#NOMAPP#NOMAGENCE#PRENOMAPP#ADR1APP#ADR2APP~
ADR3APP#ADR4APP#VILLEAPP#CPAPP#PAYSAPP#TELAPP#NUMCONTRAT#DATEEFFCTR~
in which each field is delimited by # and each record is delimited by ~ to be in tabular format.
Such as each field will be in consecutive cell and new record start in new row.
I have macro which currently requires copying data in one cell. But as string size increases beyond some limit I am unable to paste it. So, please provide other easy option.
If the size of the string exceeds the capacitiy of a single cell, then read the data in one character at a time and parse the data into fields as you go.
Assign the string to a variable (let's call it "my_var") and then
arr_1 = Split(my_var, "~", -1, vbTextCompare)
For x = LBound(arr_1,1) to UBound(arr_1,1)
activecell = arr_1(x)
activecell.offset(1,0).select
Next
this creates an array and each element is one of your records; it then places each record in a new row. You could then go back through and split each row based on "#" and place the split data in adjacent columns.
I have an NSTableView backed by an NSArrayController subclass. The data displays correctly in the table when the app loads, so all is good there. I want to add a new row to the table, so I created an override for addObject to handle my custom object. When called, addObject inserts the new object into the underlying array, but the new row is the last row in the table, (makes sense, I think, as its added to the end of the underlying array), but I want the new row to be inserted as the first row. So I changed my addObject to insert the new item at index 0 (insertObject:atArrangedObjectsIndex:). Now the new row is inserted as the first row and the cell in column 0 is editable (Yeah!). BUT, when I tab to the next cell (in column 1, row 0), the selection jumps to the last row in the table and makes the cell in the second column editable. Not what I want. So how do add a new first row to my table? Make it editable without the selection switching to the last row?
I found the problem. I was programmatically sorting the table as items were added. The sort kicked in after I entered a value in the editable filed.