Home > Back-end >  Java access database data import to excel in the template, the template has multiple headers, not fi
Java access database data import to excel in the template, the template has multiple headers, not fi

Time:01-28

According to the customer more than a secondary export excel query condition, each excel have more than one sheet, but one will need to populate the data, a sheet may have multiple headers, data from the database query, but don't know how many data, so the location of each header is not fixed (header and header are found out data in the database), how to do this?
Ps: the JDK is 1.6, can't use a higher version! Urgent ~

Email address: [email protected]

CodePudding user response:

Poi

CodePudding user response:

Can the specific point ah, this report is very complex, it also involves calculation

CodePudding user response:

Can use poi the jar package, pay attention to distinguish the XLS and XLSX two excel, multiple sheet page to obtain the total sheet pages at the beginning, to circulation, header uncertainty can be judged whether the object is empty, you not sure header refers to the header but not necessarily in the first row?

CodePudding user response:



Such a! According to excel template to export, headers are not fixed in which position, and an excel sheet page has multiple headers, according to the data query out dynamic filling to excel in the template

CodePudding user response:

Are you sure it is not difficult, query the data is to cycle into the excel sheet, then you can cycle length, when is a good judge the location of the second header, each save more than 60000 data sheet like, not too clear, now you ask is how to export excel, or header position,

CodePudding user response:

Export is more than one excel at a time, and have more than one sheet, each sheet has multiple headers, caught between the header and header inserted into the database data, then there is calculated to calculate inside!

CodePudding user response:

The implementation?? !
  • Related