Deleting Numbers sheets by name with Applescript - numbers

I'm working on a large payroll spreadsheet and would like to create code that would delete specific unnecessary worksheets within the document. Is there applescript that would remove those worksheets? Better yet, is there a way to create a new document from a specific sheet?

Related

Google app script to update data in row 2 (a named range) of a spreadsheet

i've created a script to mass produce copies of a Google Sheet from a master sheet. The script changes the name of the documents according to data in a separate sheet.
Within the template sheet, I've set row 2 as a "named range" and what i'd like the script to do is to also change the data in that row based on data I have in the master sheet.
I have been previously advised that this is possible but I confess I have no clue how to code this in to my script!
Is anyone able to offer any code which might do the job?
Many thanks
Kerry

Tableau - How to replace data source for only one sheet

I am pulling data for a couple brands into google sheets with zapier. I am pulling information from each sheet as a separate data source in tableau. The formatting across the sheets is uniform, only values are different.
My objective is to use a completed viz sheet as a template, so that I can duplicate the sheet, and replace the data source. However I am running into a problem.
Generally when replacing a data source with "replace data source" the changes occur on a project wide level, but I need the changes to occur on a sheet level.
Is there any way to hook a viz sheet into a different data source, assuming the data source has the same formatting as "template" file?
When I need to replace a data source of just one sheet, I copy and paste that sheet into a new workbook. Replace it there, and copy and paste it back to my original workbook.
A quick look on google brought up this: https://community.tableau.com/ideas/1156
It shows first that there is no "Replace source for current sheet"function as such but also gives a workaround for that:
Create bookmark (details: https://onlinehelp.tableau.com/current/pro/desktop/en-us/save_savework_bookmarks.html)
Rename original datasource
Re-import bookmark
This creates a second instance of the data source for the bookmarked sheet
Change the newly created datasource which is only used on one sheet

merge new document with several existing pdfs

I should create a new pdf , for example a offer. At the end of the new pdf i have to import several existing pdfs, these pdf has form fields and i must fill up this fields.
One problem is that the different existing PDF has all the same form fields e.g txtNAME.
Is there a possibility to add existing PDF in a open document and fill up formfields directly?
Thank for help or ideas
Just keep in mind that fields with the same name will have the same value.
This can be a boon (if you did some thinking ahead when you planned the forms), but it also can be a hindrance.
One possibility you may have, if the number different additional pages is not too high: You might prepare a "master form", which contains the subsequent pages as hidden Templates, and then when you create your document, you will spawn the according pages with the option to make unique field names.

Word Template Linked to Excel

I have an Access database that creates a Word document based on a Word template. In that template are a bunch of Charts, which in order to change their data, I have to programmatically launch an instance of Excel for each chart, change the data, then update. This is not only distracting as it flashes each Excel worksheet up on the screen then disappears, but it's incredible slow.
It would be great if the Word template could be linked to an Excel workbook where each chart is linked to that one workbook. Then, I could update the Excel file and the Word doc separately. Much faster.
The problem is, I would require there to be a separate Excel file for each Word doc. Basically I'd need a Word template to link to an Excel TEMPLATE. Then when the new Word doc is created from it's template, it's linked Excel stuff is linked to a new Excel file based on an Excel template.
Does this make sense? I just can't all Word docs linked to a single Excel file.
Thoughts?

Macros in main word document are lost in merged document

I'm performing a mailmerge via a VB app joining data from a CSV to an existing Word (2010) main document which contains some macros. When the merge is completed I display the merged doc with the data and the customer wants to run some of the macros that were in the main document against the merged document.
However, the macros from the main document don't exist in the merged document and I'm wondering if there is some way I can get them to come along for the ride.
(I do save the merged document before displaying to the user, so maybe the Save is causing me to lose them?)
Correct - the macros are not copied. If they were, you can imagine that an enormous maintenance problem could be created as every single merge document created would have a copy of the macros, not a pointer to them.
Typically, you have to put the macros in a template, and ensure that the mail merge main document is attached to the template (which will be the case if you create a new mail merge main document from the template, for example).
But when you do that neither auto macros such as autoopen and autonew, now the equivalent Document Events will run automatically when the mail merge output document is created or completed.
Also, ISTR that there is a problem where the macros may not be visible/usable until you have saved the output document (and possiby closed/re-opened it). I forget exactly what goes wrong.
If you really do need to copy the macros into the output document, I think you would be better off storing them in a .bas file outside any Word document, and you may be able to use the VB Extensibility library to load them into the output document.