按照正常流程新建程式,畫面修改上傳,程式下載修改 導入JAVA包,在global.import下 IMPORT com IMPORT JAVA java.net.URL IMPORT JAVA org.apache.poi.ss.util.CellRangeAddress IMPORT JAVA o ...
按照正常流程新建程式,畫面修改上傳,程式下載修改
導入JAVA包,在global.import下
IMPORT com
IMPORT JAVA java.net.URL
IMPORT JAVA org.apache.poi.ss.util.CellRangeAddress
IMPORT JAVA org.apache.poi.ss.util.RegionUtil
IMPORT JAVA java.io.InputStream
IMPORT JAVA java.io.FileInputStream
IMPORT JAVA java.io.FileOutputStream
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFWorkbook
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFSheet
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFRow
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFCell
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFCellStyle
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFFont
IMPORT JAVA org.apache.poi.ss.usermodel.IndexedColors
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFDataFormat
IMPORT JAVA com.fourjs.fgl.lang.FglDecimal
IMPORT JAVA com.fourjs.fgl.lang.FglDate
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFWorkbook
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFSheet
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFRow
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFCell
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFCellStyle
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFFont
IMPORT JAVA org.apache.poi.ss.usermodel.IndexedColors
IMPORT JAVA org.apache.poi.hssf.usermodel.HSSFDataFormat
IMPORT JAVA org.apache.poi.xssf.streaming.SXSSFWorkbook
IMPORT JAVA org.apache.poi.ss.usermodel.CellStyle
IMPORT JAVA org.apache.poi.ss.usermodel.Sheet
IMPORT JAVA org.apache.poi.ss.usermodel.Row
IMPORT JAVA org.apache.poi.ss.usermodel.Cell
IMPORT JAVA org.apache.poi.ss.usermodel.Font
IMPORT JAVA org.apache.poi.ss.usermodel.DataFormat
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFWorkbook
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFSheet
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFRow
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFCell
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFCellStyle
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFFont
IMPORT JAVA org.apache.poi.xssf.usermodel.XSSFDataFormat
在global.variable下添加全局變數
DEFINE g_showmsg STRING
DEFINE l_xlsfile STRING
DEFINE l_xlsname STRING
DEFINE l_target STRING
DEFINE fo FileOutputStream
DEFINE import_file InputStream
DEFINE workbook XSSFWorkbook
DEFINE sheet XSSFSheet
DEFINE row XSSFRow
DEFINE cell XSSFCell
DEFINE cell_xls HSSFCell
DEFINE font1 XSSFFont
DEFINE font2 XSSFFont
DEFINE font3 XSSFFont
DEFINE font4 XSSFFont
DEFINE format1 DataFormat
DEFINE g_num FLOAT
在DIALOG ATTRIBUTES下添加查詢欄位邏輯
ON ACTION controlp INFIELD xcag004
#add-point:ON ACTION controlp INFIELD xcag004 name="construct.c.xcag004"
#應用 a08 樣板自動產生(Version:3)
#開窗c段
INITIALIZE g_qryparam.* TO NULL
LET g_qryparam.state = 'c'
LET g_qryparam.reqry = FALSE
CALL q_xcag004() #呼叫開窗
DISPLAY g_qryparam.return1 TO xcag004 #顯示到畫面上
NEXT FIELD xcag004 #返回原欄位
#END add-point
#應用 a01 樣板自動產生(Version:2)
BEFORE FIELD xcag004
#add-point:BEFORE FIELD xcag004 name="construct.b.xcag004"
#END add-point
#應用 a02 樣板自動產生(Version:2)
AFTER FIELD xcag004
#add-point:AFTER FIELD xcag004 name="construct.a.xcag004"
#END add-point
在process下的process.count_progress下添加調用方法邏輯
CALL cxcr600_create_tmp()
CALL cxcr600_export_excel()
寫自己的方法,供上面調用
PRIVATE FUNCTION cxcr600_create_tmp()
DROP TABLE cxcr600_tmp;
CREATE TEMP TABLE cxcr600_tmp(
t_xcah020 LIKE xcah_t.xcah020, #bom階層
t_xcah004 LIKE xcah_t.xcah040, #主件料號
t_xcah004_desc LIKE type_t.chr200, #主件品名
t_xcah004_1_desc LIKE type_t.chr200, #主件規格
t_xcaeud015_sum LIKE xcae_t.xcaeud015, #合計工時
t_xcah031_a_sum LIKE type_t.num20_6, #合計材料費
t_price_ws LIKE type_t.num20_6, #未稅單價
t_xcah031_b_sum LIKE type_t.num20_6, #合計人工費
t_xcah031_b_szb LIKE type_t.num20_6, #人工費用占比
t_xcah031_a_szb LIKE type_t.num20_6, #材料費用占比
t_xcah022 LIKE xcah_t.xcah022, #元件料號
t_xcah022_desc LIKE type_t.chr200, #元件品名
t_xcah022_1_desc LIKE type_t.chr200, #元件規格
t_xcaeud015 LIKE xcae_t.xcaeud015, #各階段標準工時
t_xcaeud016 LIKE xcae_t.xcaeud016, #各階段標準機時
t_xcah031_b LIKE type_t.num20_6, #各階段人力費
t_xcah031_a LIKE type_t.num20_6, #各階段材料費
t_xcah026 LIKE xcah_t.xcah026, #工時占比(各階段/總)
t_xcah025 LIKE xcah_t.xcah025 #材料占比(各階段/總)
);
END FUNCTION
PRIVATE FUNCTION cxcr600_ins_tmp(p_imaa001_a)
DEFINE p_imaa001_a LIKE imaa_t.imaa001
DEFINE l_sql STRING
DEFINE l_dex LIKE type_t.num5
DEFINE l_docno DYNAMIC ARRAY OF RECORD
l_xcah020 LIKE xcah_t.xcah020, #bom階層
l_xcah004 LIKE xcah_t.xcah040, #主件料號
l_xcah004_desc LIKE type_t.chr200, #主件品名
l_xcah004_1_desc LIKE type_t.chr200, #主件規格
l_xcaeud015_sum LIKE xcae_t.xcaeud015, #合計工時
l_xcah031_a_sum LIKE type_t.num20_6, #合計材料費
l_price_ws LIKE type_t.num20_6, #未稅單價
l_xcah031_b_sum LIKE type_t.num20_6, #合計人工費
l_xcah031_b_szb LIKE type_t.num20_6, #人工費用占比
l_xcah031_a_szb LIKE type_t.num20_6, #材料費用占比
l_xcah022 LIKE xcah_t.xcah022, #元件料號
l_xcah022_desc LIKE type_t.chr200, #元件品名
l_xcah022_1_desc LIKE type_t.chr200, #元件規格
l_xcaeud015 LIKE xcae_t.xcaeud015, #各階段標準工時
l_xcaeud016 LIKE xcae_t.xcaeud016, #各階段標準機時
l_xcah031_b LIKE type_t.num20_6, #各階段人力費
l_xcah031_a LIKE type_t.num20_6, #各階段材料費
l_xcah026 LIKE xcah_t.xcah026, #工時占比(各階段/總)
l_xcah025 LIKE xcah_t.xcah025 #材料占比(各階段/總)
END RECORD
DEFINE l_num LIKE type_t.num5
LET l_sql = "DELETE FROM cxcr600_tmp "
EXECUTE IMMEDIATE l_sql
#插入數據
LET l_sql = "INSERT INTO cxcr600_tmp
SELECT xcah020,xcag004,a.imaal003,a.imaal004,0,0,0,0,0,0,xcah022,b.imaal003,b.imaal004,0,0,0,0,0,0 FROM xcag_t
LEFT JOIN xcah_t ON xcagent = xcahent AND xcagsite = xcahsite AND xcag001 = xcah001 AND xcag004 = xcah004
LEFT JOIN imaal_t a ON a.imaalent = xcagent AND a.imaal001 = xcag004 AND a.imaal002 = '",g_dlang,"'
LEFT JOIN imaal_t b ON b.imaalent = xcahent AND b.imaal001 = xcah022 AND b.imaal002 = '",g_dlang,"'
WHERE xcagent = ",g_enterprise," AND xcagsite = '",g_site,"' AND xcah004 = '",p_imaa001_a,"'
AND xcag001 = '101' AND xcah023 = 'A'
ORDER BY xcah020 ASC "
DISPLAY l_sql
EXECUTE IMMEDIATE l_sql
LET l_sql = " SELECT * FROM cxcr600_tmp "
PREPARE l_upd_code FROM l_sql
DECLARE l_upd_curs CURSOR FOR l_upd_code
CALL l_docno.clear() #在進入迴圈之前把二維數組清空
LET l_dex = 1 #初始化
FOREACH l_upd_curs INTO l_docno[l_dex].*
#判斷如果不屬於A或者B料號,就刪除,因為存在C,D料號屬於A類型
SELECT COUNT(*) INTO l_num
FROM cxcr600_tmp
WHERE t_xcah022=l_docno[l_dex].l_xcah022
AND (t_xcah022 LIKE 'A%' OR t_xcah022 LIKE 'B%')
IF cl_null(l_num) OR (l_num = 0) THEN
#刪除此料號
DELETE FROM cxcr600_tmp
WHERE t_xcah004 = l_docno[l_dex].l_xcah004
AND t_xcah022 = l_docno[l_dex].l_xcah022
END IF
LET l_num = 0
LET l_dex = l_dex + 1
END FOREACH
END FUNCTION
PRIVATE FUNCTION cxcr600_get_data(p_imaa001_a)
DEFINE p_imaa001_a LIKE imaa_t.imaa001
DEFINE l_sql STRING
DEFINE l_dex LIKE type_t.num5 #數組迴圈變數
DEFINE l_num LIKE type_t.num5 #判斷是否夾治具
DEFINE l_num1 LIKE xcah_t.xcah025 #上階主件底數
DEFINE l_num2 LIKE xcah_t.xcah026 #上階組成用量
DEFINE l_money_sh LIKE type_t.num20_6 #主件損耗
DEFINE l_docno DYNAMIC ARRAY OF RECORD
l_xcah004 LIKE xcah_t.xcah040, #主件料號
l_xcah004_desc LIKE type_t.chr200, #主件品名
l_xcah004_1_desc LIKE type_t.chr200, #主件規格
l_xcaeud015_sum LIKE xcae_t.xcaeud015, #合計工時
l_xcah031_a_sum LIKE type_t.num20_6, #合計材料費
l_price_ws LIKE type_t.num20_6, #未稅單價
l_xcah031_b_sum LIKE type_t.num20_6, #合計人工費
l_xcah031_b_szb LIKE type_t.num20_6, #人工費用占比
l_xcah031_a_szb LIKE type_t.num20_6, #材料費用占比
l_xcah022 LIKE xcah_t.xcah022, #元件料號
l_xcah022_desc LIKE type_t.chr200, #元件品名
l_xcah022_1_desc LIKE type_t.chr200, #元件規格
l_xcaeud015 LIKE xcae_t.xcaeud015, #各階段標準工時
l_xcaeud016 LIKE xcae_t.xcaeud016, #各階段標準機時
l_xcah031_b LIKE type_t.num20_6, #各階段人力費
l_xcah031_a LIKE type_t.num20_6, #各階段材料費
l_xcah026 LIKE xcah_t.xcah026, #工時占比(各階段/總)
l_xcah025 LIKE xcah_t.xcah025 #材料占比(各階段/總)
END RECORD
#======================================頁簽==============================================================
CALL cxcr600_ins_tmp(p_imaa001_a)
LET l_sql = " SELECT t_xcah004,t_xcah004_desc,t_xcah004_1_desc,t_xcaeud015_sum,t_xcah031_a_sum,
t_price_ws,t_xcah031_b_sum,t_xcah031_b_szb,t_xcah031_a_szb,t_xcah022,t_xcah022_desc,
t_xcah022_1_desc,t_xcaeud015,t_xcaeud016,t_xcah031_b,t_xcah031_a,t_xcah026,t_xcah025
FROM cxcr600_tmp ORDER BY t_xcah020 ASC "
PREPARE l_get_code FROM l_sql
DECLARE l_get_curs CURSOR FOR l_get_code
CALL l_docno.clear() #在進入迴圈之前把二維數組清空
LET l_dex = 1 #初始化
LET l_money_sh = 0 #初始化損耗
FOREACH l_get_curs INTO l_docno[l_dex].*
#1、標準工時 取階段料號對應的工時和
SELECT SUM(xcaeud015) INTO l_docno[l_dex].l_xcaeud015 FROM xcae_t
WHERE xcaeent = g_enterprise AND xcaesite = g_site
AND xcaestus = 'Y' AND xcae002 = l_docno[l_dex].l_xcah004
AND xcaeud001 = l_docno[l_dex].l_xcah022
IF cl_null(l_docno[l_dex].l_xcaeud015) THEN
LET l_docno[l_dex].l_xcaeud015 = 0
END IF
#2、標準機時 取階段料號對應的機時和
SELECT SUM(xcaeud016) INTO l_docno[l_dex].l_xcaeud016 FROM xcae_t
WHERE xcaeent = g_enterprise AND xcaesite = g_site
AND xcaestus = 'Y' AND xcae002 = l_docno[l_dex].l_xcah004
AND xcaeud001 = l_docno[l_dex].l_xcah022
IF cl_null(l_docno[l_dex].l_xcaeud016) THEN
LET l_docno[l_dex].l_xcaeud016 = 0
END IF
#3、人力成本 取階段料號對應的成本直接人工+間接一、二
SELECT (xcah031b+xcah031d+xcah031e) INTO l_docno[l_dex].l_xcah031_b FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah022 = l_docno[l_dex].l_xcah022
#4、材料成本 如果是夾治具,直接去成本材料費;不是的話,取它對應的下階材料費加上它自身的損耗
#取數判斷是否夾治具
SELECT imaaud011 INTO l_num FROM imaa_t
WHERE imaaent = g_enterprise AND imaastus = 'Y'
AND imaa001 = l_docno[l_dex].l_xcah022
SELECT xcah025 INTO l_num1 FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah022 = l_docno[l_dex].l_xcah022
SELECT xcah026 INTO l_num2 FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah022 = l_docno[l_dex].l_xcah022
#損耗=單位材料*組成用量/主件底數/(1-損耗)-單位材料*組成用量/主件底數 更新到主件中去
SELECT (xcah030a*xcah026/xcah025/(1-xcah027/100)-xcah030a*xcah026/xcah025) INTO l_money_sh FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah040 = l_docno[l_dex].l_xcah022
AND xcah023 = 'A' AND xcah022 IN (
SELECT imaa001 FROM imaa_t
WHERE imaaent = g_enterprise AND imaastus = 'Y'
AND (imaaud011 = 0 OR imaaud011 IS NULL)
)
IF cl_null(l_money_sh) THEN
LET l_money_sh = 0
END IF
#判斷是否夾治具料號,如果是直接取夾治具材料成本,否則的話取下階材料和
IF l_num <> 0 THEN
SELECT xcah031a INTO l_docno[l_dex].l_xcah031_a FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah022 = l_docno[l_dex].l_xcah022
ELSE
SELECT SUM(xcah031a/l_num1*l_num2) INTO l_docno[l_dex].l_xcah031_a FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah023 = 'M' AND xcah040 = l_docno[l_dex].l_xcah022
AND xcah020 IN (
SELECT xcah020+1 FROM xcah_t
WHERE xcahent = g_enterprise AND xcahsite = g_site AND xcah001 = '101'
AND xcah004 = l_docno[l_dex].l_xcah004 AND xcah022 = l_docno[l_dex].l_xcah022
)
#如果下階無材料,費用為空,另它等於零
IF cl_null(l_docno[l_dex].l_xcah031_a) THEN
LET l_docno[l_dex].l_xcah031_a = 0
END IF
#費用加上它的損耗
LET l_docno[l_dex].l_xcah031_a = l_docno[l_dex].l_xcah031_a+l_money_sh
LET l_money_sh = 0
END IF
IF cl_null(l_docno[l_dex].l_xcah031_a) THEN
LET l_docno[l_dex].l_xcah031_a = 0
END IF
#5、合計人工 取axci006裡面主件直接+間接
SELECT (xcag102b+xcag102d+xcag102e) INTO l_docno[l_dex].l_xcah031_b_sum FROM xcag_t
WHERE xcagent = g_enterprise AND xcagsite = g_site
AND xcag001 = '101' AND xcag004 = l_docno[l_dex].l_xcah004
#6、合計材料 直接取axci006主件材料費
SELECT xcag102a INTO l_docno[l_dex].l_xcah031_a_sum FROM xcag_t
WHERE xcagent = g_enterprise AND xcagsite = g_site
AND xcag001 = '101' AND xcag004 = l_docno[l_dex].l_xcah004
#7、合計工時 取axci005裡面所有工時和
SELECT SUM(xcaeud015) INTO l_docno[l_dex].l_xcaeud015_sum FROM xcae_t
WHERE xcaeent = g_enterprise AND xcaesite = g_site
AND xcaestus = 'Y' AND xcae002 = l_docno[l_dex].l_xcah004
#8、未稅單價
LET l_docno[l_dex].l_price_ws = cxcr600_get_price(l_docno[l_dex].l_xcah004)
#9、主件人工占比
LET l_docno[l_dex].l_xcah031_b_szb = l_docno[l_dex].l_xcah031_b_sum/l_docno[l_dex].l_price_ws
#10、主件材料占比
LET l_docno[l_dex].l_xcah031_a_szb = l_docno[l_dex].l_xcah031_a_sum/l_docno[l_dex].l_price_ws
#11、工時占比
LET l_docno[l_dex].l_xcah026= l_docno[l_dex].l_xcaeud015/l_docno[l_dex].l_xcaeud015_sum
#12、材料占比
LET l_docno[l_dex].l_xcah025 = l_docno[l_dex].l_xcah031_a/l_docno[l_dex].l_xcah031_a_sum
LET l_dex = l_dex + 1
END FOREACH
CALL l_docno.deleteElement(l_docno.getLength())
RETURN l_docno
END FUNCTION
PRIVATE FUNCTION cxcr600_export_excel()
DEFINE style2 XSSFCellStyle
DEFINE style3 XSSFCellStyle
DEFINE style3_5 XSSFCellStyle
DEFINE style4 XSSFCellStyle
DEFINE style4_1 XSSFCellStyle
DEFINE style4_3 XSSFCellStyle
DEFINE style4_3_1 XSSFCellStyle
DEFINE style5 XSSFCellStyle
DEFINE style6 XSSFCellStyle
DEFINE style7 XSSFCellStyle
DEFINE style8 XSSFCellStyle
DEFINE style9 XSSFCellStyle
DEFINE workbook XSSFWorkbook
DEFINE l_str STRING
DEFINE l_cnt LIKE type_t.num10
DEFINE l_i LIKE type_t.num5
DEFINE l_n LIKE type_t.num5
DEFINE l_n2 LIKE type_t.num5
DEFINE l_fileloc STRING
DEFINE l_length LIKE type_t.num10
DEFINE region CellRangeAddress
DEFINE l_m LIKE type_t.num5
DEFINE l_flag LIKE type_t.chr100
DEFINE l_n1 LIKE type_t.num5
DEFINE l_num FLOAT
DEFINE li_font_size LIKE type_t.num5
DEFINE l_time LIKE pmaa_t.pmaacrtdt
DEFINE l_string LIKE type_t.chr200
DEFINE l_dex LIKE type_t.num5
DEFINE l_m_n LIKE type_t.num5
DEFINE l_number FLOAT
DEFINE l_sql STRING
DEFINE l_row LIKE type_t.num10
DEFINE l_row1 LIKE type_t.num10
DEFINE l_sum_days LIKE type_t.num5
DEFINE l_imaa001 LIKE imaa_t.imaa001
DEFINE r_docno DYNAMIC ARRAY OF RECORD
l_xcah004 LIKE xcah_t.xcah040, #主件料號
l_xcah004_desc LIKE type_t.chr200, #主件品名
l_xcah004_1_desc LIKE type_t.chr200, #主件規格
l_xcaeud015_sum LIKE xcae_t.xcaeud015, #合計工時
l_xcah031_a_sum LIKE type_t.num20_6, #合計材料費
l_price_ws LIKE type_t.num20_6, #未稅單價
l_xcah031_b_sum LIKE type_t.num20_6, #合計人工費
l_xcah031_b_szb LIKE type_t.num20_6, #人工費用占比
l_xcah031_a_szb LIKE type_t.num20_6, #材料費用占比
l_xcah022 LIKE xcah_t.xcah022, #元件料號
l_xcah022_desc LIKE type_t.chr200, #元件品名
l_xcah022_1_desc LIKE type_t.chr200, #元件規格
l_xcaeud015 LIKE xcae_t.xcaeud015, #各階段標準工時
l_xcaeud016 LIKE xcae_t.xcaeud016, #各階段標準機時
l_xcah031_b LIKE type_t.num20_6, #各階段人力費
l_xcah031_a LIKE type_t.num20_6, #各階段材料費
l_xcah026 LIKE xcah_t.xcah026, #工時占比(各階段/總)
l_xcah025 LIKE xcah_t.xcah025 #材料占比(各階段/總)
END RECORD
DEFINE l_date LIKE type_t.dat
DEFINE l_day LIKE type_t.num5
DEFINE l_field LIKE type_t.chr200
DEFINE l_i_dex LIKE type_t.num10
CALL ui.Interface.frontCall("standard","opendir",["C:", "File Browser"],[g_showmsg])
LET workbook = XSSFWorkbook.create() #創建工作簿
#設定EXCEL單元格式1
LET style2 = workbook.createCellStyle()
CALL style2.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER)
CALL style2.setAlignment(XSSFCellStyle.ALIGN_CENTER)
CALL style2.setBorderBottom(XSSFCellStyle.BORDER_THIN)
CALL style2.setBorderLeft(XSSFCellStyle.BORDER_THIN)
CALL style2.setBorderTop(XSSFCellStyle.BORDER_THIN)
CALL style2.setBorderRight(XSSFCellStyle.BORDER_THIN)
CALL style2.setWrapText(true)
#設定EXCEL單元格式2 包涵背景顏色
LET style3 = workbook.createCellStyle()
#CALL style3.setFillForegroundColor(IndexedColors.LIME.getIndex())
CALL style3.setFillForegroundColor(IndexedColors.WHITE.getIndex())
CALL style3.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND)
CALL style3.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER)
CALL style3.setAlignment(XSSFCellStyle.ALIGN_CENTER)
CALL style3.setBorderBottom(XSSFCellStyle.BORDER_THIN)
CALL style3.setBorderLeft(XSSFCellStyle.BORDER_THIN)
CALL