Message Boards Message Boards

How can I populate new notebooks from a list of grids?

Posted 9 years ago

Hi everyone,

I have a list of 38 grids

myGrids

that are styled with a particular font family, font size, and dividers. I want to run a Do loop that will create a new notebook for each grid, insert the grid, and then save each as PDF. I know I should be using Cell[...] to insert each grid into a new notebook, but when I do I get all of the style and other codes coming out.

count=0; Do[count++;
exportFilename = "File "<>ToString[count] <> ".pdf";    
      nb = CreateDocument[
        {TextCell["TITLE HERE", "Section"],
         Cell[(*Don't know how to put thisGrid here*)]
         },
        Visible -> False];
      NotebookPrint[nb, exportPath <> exportFilename];
      NotebookClose[nb],
      {thisGrid, myGrids}
      ]
     ]

Any suggestions would be much appreciated.

Gregory

POSTED BY: Gregory Lypny
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract