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

Implement specificWorkbookSheet method #238

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

HasaanA16
Copy link

@HasaanA16 HasaanA16 commented Jul 9, 2021

The specificWorkbookSheet() takes a workbook and sheetNumber as an argument, and creates an html of a specific sheet using the predefined method processSheet().

Initially it was not possible as processSheet() is protected and cannot be used.

@@ -668,7 +668,7 @@ protected void processSheetHeader(Element htmlBody, HSSFSheet sheet) {
htmlBody.appendChild(h2);
}

public void processWorkbook(HSSFWorkbook workbook) {
public void processWorkbookSheet(HSSFWorkbook workbook) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be renamed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, naming is not an issue. It was just my idea. Keeping the name same is also fine

@@ -692,6 +692,24 @@ public void processWorkbook(HSSFWorkbook workbook) {
htmlDocumentFacade.updateStylesheet();
}

public void processWorkbookSheet(HSSFWorkbook workbook, int sheetNumber) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you call this processWorksheet?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to just pass a HSSFWorksheet in the input instead of a workbook and sheetNumber?

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