We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Repeating Row and column headers inconsistent

I have Observed with Big table repeating rows and column headers is inconsistent,with my sample attachment from page 5 onward we will get twice header draw object instead of one.

Total Pages : 12 Current Page : 5 Cell : Big Table with Random Data and Repeating Row and Column Headers: X - Left of Cell :53.29134: Y - Top of Cell :54.0Width :592.6137

Total Pages : 12 Current Page : 5 Cell : Big Table with Random Data and Repeating Row and Column Headers: X - Left of Cell :210.51538: Y - Top of Cell :54.0Width :451.5152

Pls place the repeatingRows&ColHeaders_xlsx file in the tmp folder and run.

Fin the coordinates in the cmd line.

Pls find the attachment of sample.

Thanks.repeatingRows&ColHeaders_xlsx.zip (116.9 KB)

@oraspose,

Thanks for the template file and sample code.

We did evaluate your issue a bit using your sample code with template file. We appreciate if you could provide more details and series of screenshots to highlight the problematic areas comparing draw objects results with original data. Also give us complete coordinates of the console output you got (you may save to some .txt file) on your end. This will help us really to evaluate your issue precisely and we may log appropriate ticket(s) to investigate your issue.

I have attached the 2 snap shots and log file.
rcc1 image:represents the 4th page of a pdf, until that page you can see the red line overlapping is correct because the repeating header information got correctly,mean on every page it should give 1 header meta data by DrawObjectEventHandle.
rcc2 image:You can see the overlapping of red grid lines are not proper because on this page we got 2 headers draw objects.
When you open log file you can find twice header meta data printed for page 5,where as above pages it is one time.

Thanks.repeatingRows&ColHeaders_xlsx2.zip (461.7 KB)

@oraspose,

Which version of the product you are using? I used our latest version/fix: Aspose.Cells for Java v18.6.7 (please try it if you are not already using it):

Please find attached the output PDF file when using your sample code for your reference. I could not spot the issue as per your screenshots. Could you check the output file by opening the file into Adobe acrobat, do you find any issue in it, kindly provide details.
Repeating Headers.pdf (188.6 KB)

using 18.3.7.
It is not about the pdf generation,as i mentioned during excel to pdf conversion we capture the printable meta data of cells using DrawObjectEventHandler,so with big table with repeatable row and column header we are getting multiple header meta data instead of one for page 5 for our sample xlsx file.
This you can see in the logs that i have attached.
Thanks.

@oraspose,

Thanks for providing us further details.

After further evaluation, I was able to observe the issue as you mentioned by using your sample code with your template file. I found when using DrawObjectEventHandler to print meta data of cells for a table (with repeatable row and column header) gives multiple header meta data instead of one for some pages (e.g Page 5, 6, 7, etc.). I noticed this issue in the log file which I saved for console outputs to it. I have logged a ticket with an id “CELLSJAVA-42660” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@oraspose,

We have evaluated your issue further.
If you add cell name to output info using the following code segment:
e.g
Sample code:

............
System.out.println("Total Pages : " + dobj.getTotalPages() + " Current Page : " + dobj.getCurrentPage() + 
                           " Cell[" + (dobj.getCell() != null ? dobj.getCell().getName() : null) + "]: " 
                           + (dobj.getCell() != null ? dobj.getCell().getStringValue() : null) + 
                           ": X - Left of Cell :" + x + ": Y - Top of Cell :" + y +" Width :"+ w); 

you will find that, the twice header draw object for page 5~8 (page indexes 4~7) is Cell A1 and H1.

Total Pages : 12 Current Page : 4 Cell[A1]: Big Table with Random Data and Repeating Row and Column Headers: X - Left of Cell :76.53543: Y - Top of Cell :54 Width :520.855
Total Pages : 12 Current Page : 4 Cell[H1]: Big Table with Random Data and Repeating Row and Column Headers: X - Left of Cell :214.4088: Y - Top of Cell :54 Width :397.4946

Cell A1 is output because of Column A is the repeat column title.

Thanks for your understanding!

Hi,
I see the status as resolved,does it mean is any code fix?

Thanks.

@oraspose,

No the issue is closed with resolution type as “Won’t Fix”. Please see the previous post in the thread for your reference.