Skip to content

Allow multiple Print Areas per worksheet #1041

Closed
@AlexanderPruss

Description

@AlexanderPruss

I would like to add the ability to save multiple print areas per worksheet to exceljs.

As seen in this Microsoft Excel documentation, excel sheets can have multiple print areas, but the pageSetup of a sheet currently only accepts a single print area. Or rather, printArea accepts a string, but the workbook-xform assumes that this string has only a single print area and parses it accordingly.

I see two straightforward solutions -

  • allow printArea to contain multiple print areas with a separator. Something like printArea:= B2:C5&&B7:C9 would specify two rectangles to print.
  • add an additional property printAreas that contains an array of print area strings.

I think the first one is better. A separator isn't super clean, but it's better than duplicating the property and is backwards compatible. I'll see if I can get an example PR up sometime soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy