この記事の例は、Java Operation Excelの方法を伝えています。あなたの参照のために全員のためにそれを共有してください。詳細は次のとおりです。
writableworkbook workbook = workbook.createworkbook(new file( "d://output.xls"); writablesheetシート= workbook.createsheet( "Project Briefing"、0); itableFont sonti18font = new WritableFont(writablefont.createfont( "song style" " )、18、writablefont.bold); writablecelformat(sonti18font); ) l.formation.centre. center); 0); Addcell(0,1、 "Project12Subject)); Sheet.Addcell(1、1、projreportparam.getProj_code()、font12subjectnobold); 、1、 "Project Manager"、font12subject.addcell(3,1 label、projreportparam.getemp_name()、font12subjectnobold); sheet.Addcell ) 2、projreportparam.getplan_cost()、font12subjectnobold); ) 5、3) ; sheet.addcell(1,6、font12subject); sheet.addcell、font12subject(4,6、 "実際の起動時間、font12subject); sheet.addcell (新しいラベル(5,6、「ステータス」、font12Subject); int i = 7; label (1, i, projreportparamminfo.getttttttttttttttttttttttttttttttttttttttttta_itemm (), font12subjectnobold); sheet.addcell (new label (2, i, projreportparamminfo.Getemp_name (), font12subjectnobold)); sheet.addcell (New Label 3, I, Utils.Formatdate ( projreportparamminfo.gettask_plan_sd() + " /" + utils.formatdate(projreportparamminfo.gettask_plan_fd()、font12subjectnobold) _ACTUAL_FD())、 font12subjectnobold) Sheet.AddCell(0、j、font18subject); 「シリアル番号」、font12subject); Sheet.AddCell(新しいラベル(3、J+1、「プロジェクトチームタイムを入力する」、font12Subject); sheet.Addcell(新しいラベル(4、J+1、「プロジェクトチームタイムを離れる」、font12Subject);シート。 addcell(新しいラベル(5、J+1、「累積労働時間」、font12Subject); int m = 1; //シリアル番号int n = j+2; // tparamhrinfo:projreportparam .getprojreportparamhrinfolist(){sheet.addcell (新しいラベル(0、n、m+""、font12subjectnobold); sheet.addcell(新しいラベル(1、n、projreportparamhhrinfo .getemp_name()、font12subjectnobold); sheet.addcell(new label(2、n、projreporamhrinfo.getrole_name) )、font12subjectnobold); addcell(3、n、utils.formatdate(projreportparamhrinfo .. gethr_start_date())、font12subjectnobold); sheet.addcell(新しいラベル(新しいラベル(新しいラベル(新しいラベル))新しいラベル(新しいラベル4、n、utils.formatdate(projreportparamhrinfo.gethr_release_date())、font12subjectnobold)(5、n、projreportparamhrinfo.get total_manhour()、font12sububjednobold); +;} //プロジェクトチームメンバーと人の作業コンテンツ//この問題の作業コンテンツint k = n+1;この問題( "+startdate+"〜 "+enddate+")、font18subject.mergecells(k、6、k); ; sheet.addcell(新しいラベル(1、K+1、K+1 1、「タスク名」、font12Subject); sheet.addcell(新しいラベル(2、k+1」、font12subject); Sheet.AddCell(新しいラベル(3、K+1、「実際の開始時間と終了時間」、font12Subject); sheet.Addcell(新しいラベル(4、K+1、「計画時間」、font12Subject); sheet.addcell (新しいラベル(5、K + 1、「実際の労働時間」、font12Subject); sheet.addcell(新しいラベル(6、k + 1、 "persons"、font12subject); int p = k + 2; // fore( projreportparamtaskinfo projreportparamtaskinfo:tthisprojreportparamtaskinfolist()){sheet.addcell(0、p、projreportparamtaskinfo.gettask_code()、font12subjedtnobold; tttttttttttttask_item()、fon t12subjectnobold); (新しいラベル(2、p、utils.formatdate(projreportparamtaskinfo.gettask_plan_sd()) + " /" + utils.formatdate(projreportparamtaskinfo.gettask_plan_fd())、font12subjectnobold); .formatdate(projreportparamtaskinfo.getttask_actual_sd() ont12subjectnobold); .Addcell(新しいラベル(5、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、P、 P、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、p、 projreporamtaskinfo.gettask_actual_manhour()、font12subjectnobold); Sheet.AddCell(新しいラベル(0、Q、 "来週の作業コンテンツ、font18Subject); sheet.mergecells(0、q、5、q); sheet.addcell(new Label(0(0(0(0(0))) 0(0(0、q+1、 "タスク番号"、font12subject); sheet.addcell(new label(1、q+1、 "task name"、font12subject); sheet.addcell(new Label(2、Q+) 1、 "" Plan Start Time "、font12Subject); sheet.Addcell(新しいラベル(3、Q+1、" Plan End Time "、font12Subject); sheet.Adddell(new Label(4、Q+1、" Plan Working) hours "、font12subject); sheet.addcell(new Label(5、q + 1、" Executive forness "、font12subject); int r = q + 2; for (新しいラベル(0、r、projreportparamtaskinfo.getttask_code()、font12subjectnobold); sheet.addedcell(new label(1、r、projreportparamtask_item()、font12subjectnobold); sheet.addcell(新しいラベル(2、r、r、r、util) projrepormtaskinfo.gettask_plan_sd())、font12subjectnobold);情報。 gettask_plan_manhour()、font12subjectnobold); s = r + 1; // like sheet.addcell(0、s、 ""既存の問題とソリューション "、font18subject); sheet.mergecells(0、s、8、s); sheet.adddell(newラベル(0、s+1、 "認識日、font12subject); sheet.addcell(new label(1、s+1、"問題説明 "、font12subject); sheet.adddell(new Label(2、s、s +1) 、「帰属リスク」、font12subject); ); sheet.addcell(5、s+1、 "plan start time、font12subject); sheet.addcell(new label(6、s+1、" plan compley "、font12subject);; new Label (新しいラベル(7、s+1、 "問題状態、font12Subject); sheet.adddell(新しいラベル(8、s+1、" summary "、font12subject); int t = s+2; //:projreparamriskinfo projreportparamriskinfo:projreportparamm .getProjreparamriskInfolist()){sheet.addcell(0、utils.f ormatdate(projreportparamriskinfo.getsts_date()、font12subjectnobold) 、font12subjectnobold) dcell(newラベル(4、t、projreportparamriskinfo.getissue_resolve_emp()、font12subjectnobold); T、utils.formatdate(projreportparamriskinfo.getissue_date())、font12subjectnobold); getIssue_summarize()、font12subjectnobold);この記事がすべての人のJavaプログラムのデザインに役立つことが期待されています。