Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

ExcelApplication can open and modify an existing spreadsheet. The new spreadsheet can either be saved to disk (overwriting the original file or saved with a new name) or streamed to the browser. This allows you to use a preset format for similar spreadsheets, rather than recreate the format for each. Alternatively, use an ExcelWriter template.

All features in the original workbook - including macros, charts, PivotTables, and VBA - will be preserved in the new workbook.

How to Modify an Existing Spreadsheet

To modify an existing spreadsheet:

  1. Create an instance of ExcelApplication:
  2. Open an Excel workbook from a file path or a System.IO.Stream:
  3. Return a Worksheet object:
  4. Modify the worksheet. For example, add a cell value:
  5. Save the modified file with a new name, or stream it to the client:
    For more information on save options, see Output Options.
  • No labels