User Tools

Site Tools


transformations:excelcommand

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
transformations:excelcommand [2021/11/26 20:57] – [See also] Linki to Community article craigttransformations:excelcommand [2022/01/31 13:07] – Add Re-save and Save to PDF modes. craigt
Line 11: Line 11:
   * Delete sheet   * Delete sheet
   * Recalculate workbook   * Recalculate workbook
 +  * Re-save
 +  * Save as PDF
  
 \\ \\
Line 24: Line 26:
 |Command|Select the command to run on the selected Excel file.  Options:  //List sheets/ranges//, //Run VBA macro//, //Rename sheet//, //Delete sheet//, or //Recalculate workbook// See below for details of each command.| |Command|Select the command to run on the selected Excel file.  Options:  //List sheets/ranges//, //Run VBA macro//, //Rename sheet//, //Delete sheet//, or //Recalculate workbook// See below for details of each command.|
  
-<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\+<sup>*</sup> Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
  
 \\  \\ 
Line 46: Line 48:
 |Macro arguments<sup>*</sup>|If the macro being run accepts arguments, the values to be passed in are listed here.  Arguments should be\\ listed in the order the macro is expecting them.| |Macro arguments<sup>*</sup>|If the macro being run accepts arguments, the values to be passed in are listed here.  Arguments should be\\ listed in the order the macro is expecting them.|
  
-<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\+<sup>*</sup> Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
  
 \\  \\ 
Line 55: Line 57:
 |New name<sup>*</sup>|Enter the name the selected sheet will be changed to.| |New name<sup>*</sup>|Enter the name the selected sheet will be changed to.|
  
-<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\+<sup>*</sup> Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
  
 \\  \\ 
Line 63: Line 65:
 |Sheet name<sup>*</sup>|Select the existing sheet in the Excel file to be deleted.| |Sheet name<sup>*</sup>|Select the existing sheet in the Excel file to be deleted.|
  
-<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\+<sup>*</sup> Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
  
 \\  \\ 
Line 69: Line 71:
 Description:  Forces the recalculation of all formulas within the workbook.\\ Description:  Forces the recalculation of all formulas within the workbook.\\
 This mode has no settings. This mode has no settings.
 +
 +\\ 
 +====Re-save settings====
 +Description:  Forces a re-saving of the .xlsx workbook to correct possible format problems introduced programmatically by 3rd-party utilities/libraries.\\
 +This mode has no settings.
 +
 +\\ 
 +====Save as PDF settings====
 +Description:  Generates a PDF file from the selected sheets in an Excel workbook.
 +^Setting^ Description  ^
 +|PDF file<sup>*</sup>|Enter the fully qualified path and filename of the PDF file to be generated.|
 +|If the PDF file already exists|Choose how EasyMorph will handle situations when the PDF file already exists.  Options:  //Overwrite// (replace the existing file), //Rename// (generate a new name for file being created), or //Halt project execution// (stop the workflow with a warning).|
 +|Page range|Choose which pages to include in the PDF file.  Options:  //All pages// (all pages in the select sheet will be exported to the PDF file), or //Pages// (and enter the starting and ending number of the pages to be exported).|
 +|Sheets|Choose which workbook sheets will be exported to the PDF file.  Options:  //All sheets// (the content from all worksheets will be exported), or //Selected sheets// (select the sheets to include from the list).|
 +
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]] or the first value of a column.\\
  
 \\  \\ 
Line 75: Line 93:
 When running a macro that alters the macro's own file, do not include a //Workbook.Close// statement at the end of the subroutine.  Doing so will generate an error as EasyMorph holds the Excel file open.  Remove the statement and allow EasyMorph to close the file.  If using a //Workbook.Close True// statement to both save and close the workbook, use a //Workbook.Save// statement instead. When running a macro that alters the macro's own file, do not include a //Workbook.Close// statement at the end of the subroutine.  Doing so will generate an error as EasyMorph holds the Excel file open.  Remove the statement and allow EasyMorph to close the file.  If using a //Workbook.Close True// statement to both save and close the workbook, use a //Workbook.Save// statement instead.
  
-When capturing a return value from a function macro, the output dataset of the action will be the captured value.  If the return value is an array, each value will be split into its own row.+When capturing a return value from a function macro, the output dataset of the action will be the captured value.  If the return value is an array, each value will be split into its own row.\\ 
 +\\  
 +===Save to PDF=== 
 +This mode triggers the "Export to PDF" process within Excel which uses the "Microsoft Print to PDF" printer to format the pages.  Pre-select this printer in Excel prior to laying out the pages to be printed to ensure margins and spacing are accurate in the resulting PDF files.
  
  
transformations/excelcommand.txt · Last modified: 2023/04/20 19:36 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki