Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: header and footer support image #2563

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

baian1
Copy link

@baian1 baian1 commented Oct 20, 2023

Introduce additional functionalities to enable the use of images in headers and footers.

example code:

  const workbook = new Excel.Workbook()
  await workbook.xlsx.readFile('./example.xlsx')
  const sheet = workbook.getWorksheet(1)
  sheet.headerFooter.oddHeader = '&R&G image';
  const imageId = workbook.addImage({
    filename: './test.jpeg',
    extension: 'jpeg',
  })
  sheet.addHFImage(imageId, { id: 'HF', width: '15pt', height: '15pt' })

TODO:

  • fix: miss comment legacyDrawing (need help)

test xlsx compatibility

  • wps
  • office excel
  • libre office not support

@baian1
Copy link
Author

baian1 commented Nov 28, 2023

@Siemienik this feature is done. if you have time, please review it.

@Siemienik
Copy link
Member

Thank you, I report it as a candidate to 4.5.0 discussion: #2574

Usually I take PRs to review by thumbs up amount and from the candidates list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants