We help IT Professionals succeed at work.

header name was missing while generating .xlsx file with the help of apache poi.

when i m generating .xlsx file it's genrating perfectly but every time some header name is missing .
suppose 20 column is there in a xlsx file some time 1or 2 or 3 header name was missing .
data are coming but only header name is missing there please let me know what is the issue.
Watch Question

Top Expert 2016

We can't tell you without seeing your code
As CEHJ said, sight of your code would be helpful.
Meantime, from what I remember of fiddling with Excel, handling header rows can be tricky and. as you may know. could require some extra care in terms of how it's done.
Check the parameters perhaps of


and the Header field in such contexts as, for example, this :

Sheet1.Columns(1).Sort key1:=Sheet1.Range("A1"), order1:=xlAscending, Header:=xlNo

You might also want to double-check that the header hasn't ended up being sorted with the rest of the row data somehow, because of one missed filter parameter.

But as I say, this might not be the cause at all, and so posting your code will allow those in the know to give you better assistance.


Thank you for Support.