开发者

How to read and update dynamic excel file programatically using apache poi 3.5 and java?

Now i want to read any excel file that are given by the user dynamically and also the extract the data in the tabular form and also update the data the cells...

so, how to capture the column headers and 开发者_如何学Pythonrow headers in the excel tabular form and also modify the particular cell value....

See my excel file may like this:

Excel file data

Production Tracking System                              
Production Report                               
Location                    Number of centers           Note:
Manager Name                    Number of emp           
Manager No                              
Project Name                                
Production Plan         Status of the Production                    
Center Name Date    Target  Status  Items Completed Defects Pending Estimated date of completion    Comments

worker_mdi_1    10/19/2010  0   0   0   0   0   10/19/2010  Nil
Total   10/19/2010  0   0   0   0   0   10/19/2010  Nil

and also append the new data at the last row like Total row. How to do this?


I've never seen a function to annotate worksheet cells as "header". Excel itself can detect row and column header but I'm sure this is based on some sort of pattern recognition. It does some analysis on the cell content and "guesses" if a cell contains a row or column header entry or a value.

Maybe you're lucky and the header values are fixed, so that you can scan the worksheet areas for those known values in rows and cells.


(Old part of the answer, based on a misunderstanding)

As far as I understand your question, you'd like to now how to use apache POI. Reading an excel file and reading/modifying worksheet content are basic tasks. Apache has some howtos, manuals and examples on their page. Look at the "General Use" section on the howto page, they have an example for reading an writing an excel file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜