第六章 結論與建議
6.2 建議
模糊評價分析為一項較客觀之分析方法,因此除了判別矩陣、學習地圖、國家基礎 競爭力相對程度雷達圖外,應可以再做其他分析,以提供決策者更多元化之資訊。
在系統自動化部分,惟本系統受限於本研究人員技術門檻及時間上之限制,故在 IMD 資料整理、群集化分析、部分模糊程度轉換以及 Background information 之操作上 仍須以手動方式運算,且需要採用多項軟體來輔助分析,建議後續之研究人員,可參考 本研究在 3.4.5 補充說明之建議,在未來建立出全自動化之決策支援系統,以更有效之 應用及推廣模糊評價方法。
109
參考文獻
外文部分
1. Afonso, A. & St. Aubyn, M. (2008) Macroeconomic rates of return of public and private investment: crowding-in and crowding-out effects, Working Paper Series 864, European Central Bank.
2. Andrade, M. Madalozzo, R. & Valls Pereira, P.L. (2004) Convergence clubs among Brazilian municipalities, Economics Letters, 83(2), pp. 179–184.
3. Arslanalp, S. Bornhorst, F. & Gupta, S. (2011) Investing in growth (Finance &
Development, International Monetary Fund 48).
4. Aschauer, D. (1989a) Is Public Expenditure Productive? Journal of Monetary Economics, 23(2), pp. 177-200.
5. Aschauer, D. (1989b) Does public capital crowd out private capital? Journal of Monetary Economics, 24(2), pp. 171-188.
6. Clark, R. M. (1989) Developing a data base on infrastructure needs, Journal of the American Water Works Association, v 81, n 7, Jul, p 81-87.
7. Dixhoorn, J. (1984) Ports and Waterways Infrastructure in the Netherlands, Bulletin of the Permanent International Association of Navigation Congresses, 58(47), 3-8.
8. Fotopolos, G. (2006) Nonparametric analysis of regional income dynamics: the case of Greece, Economics Letters, 91(3), pp. 450–457.
9. Glrigg, N. S. (1985) Research Needs for Infrastructure Management, Journal of Urban Planning and Development, 111(1), 49-64.
10. Gomez-Limon, J. A. and I. Atance (2004), Identification of Public Objectives Related to Agricultural Sector Support, Journal of Policy Modeling, 26:1045-71.
11. Herrerias, M. J. & Ordoñez, J. (2012) New evidence on the role of regional clusters and convergence in China (1952–2008), China Economic Review, 23, pp. 1120–1133.
12. Johnson, P. A. (2005) A continuous state space approach to “Convergence by Parts”, Economics Letters, 86, pp. 317-321.
13. Maasoumi, E. and L. Wang (2008), Economic reform, growth and convergence in China, Econometrics Journal 11, 128–154.
14. Mandele, M. Walker, W. and Bexelius, S. (2006) Policy Development for Infrastructure Networks: Concepts and Ideas, Journal of Infrastructure Systems, June, p69-76.
15. Onera M. A. and Saritas O. (2005) A systems approach to policy analysis and development planning: Construction sector in the Turkish 5-year development plans, Technological Forecasting & Social Change, 72, 886-911.
16. Pittau, M. & Zelli, R. (2006) Empirical evidence of income dynamics across EU regions, Journal of Applied Econometrics, 21(5), pp. 605–628.
17. Quah, D. (1996) Twin peaks: growth and convergence in models of distribution dynamics,
110
Economic Journal, 106, pp. 1045-1055.
18. Short, J. & Kopp, A. (2005) Transport infrastructure: Investment and planning, Policy and research aspects, Transport Policy, 12(4), pp. 360-367.
19. Sutherland, D. Araujo, S. É gert, B. & Kozluk, T. (2009) Infrastructure Investment: Links to Growth and the Role of Public Policies, OECD Economics Department Working Papers 686, OECD Publishing.
20. Väntänen, A. and Marttunen, M. (2005) Public involvement in multi-objective water level regulation development projects-evaluating the applicability of public involvement methods, Environmental Impact Assessment Review, 25, 281-304.
21. Wang, S. H. (2013). Fuzzy Evaluations Applied in Analysis of Infrastructure Development based on National Competitiveness Perspectives. Journal of Economic Policy Reform.
22. William, T. and Donald, U. (1987) Infrastructure Needs Analysis Limits Reactive Management, American City & County, v 102, n 5, May, p 38-39.
中文部分
1. 王世旭,依國家競爭力觀點選擇國家重點基礎建設項目之研究,博士論文,2007 2. 陳宛瑩,台灣之國家競爭力的定位與相關分析-以 IMD 資料為基礎,碩士論文,2008 3. 游竣鴻,以 IMD 國家競爭力年報評估台灣基礎建設發展,碩士論文,2008
4. 朱鎮明、朱景鵬,「政府效能對國際競爭力影響評析」,研考雙月刊,2006 5. 行政院,運用國家競爭力評比指標強化施政績效管理,委託研究報告,2004
6. 朱鎮明、朱景鵬,「政府效能對國際競爭力影響評析」,研考雙月刊,2006,P.24-41 7. 江啟臣、黃富娟,「全球化下城市競爭力指標之探討」,研考雙月刊,2006,P.27-41 8. 周秩年,ADSL 費率結構之分析-以台灣、日本、新加坡、澳洲為例,傳播與管理研
究期刊,2005,P.91-121
111
附錄一 系統讀取之 Excel 畫面
1. 國家工作表
圖 61 國家工作表
2. 標準化工作表
將各國家按照名稱排序 後輸入
依照各國家之標準化值
輸入
112
圖 62 標準化工作表
3. 分群工作表
圖 63 分群工作表
4. 常態非常態判斷工作表
圖 64 常態非常態工作表
依照各國家之分群群集 數輸入
依照各分群群數,將 SPSS 判斷後之常態非常態分 佈情況輸入,0 非常態,
1 為常態
113
5. 分群群集工作表
圖 65 分群群集工作表 以下兩張圖表為系統計算過後之顯示結果:
6. 計算工作表
圖 66 計算工作表
依照各指標分群數目輸
入
114
7. 相對次數工作表
圖 67 相對次數工作表
115
116
附錄三 前 10 項劣勢程度指標之資料
指標編號: 4.1.04
指標英文名稱: ACCESS TO WATER 指標中文名稱: 水源使用
解釋: Access to water is not adequately ensured and managed / Access to water is adequately ensured and managed
單位: SURVEY
指標編號: 4.2.09
指標英文名稱: COMPUTERS PER CAPITA 指標中文名稱: 電腦普及率
解釋: Number of computers per 1000 people/ Source: Computer IndustryAlmanac
解釋: Number of internet users per 1000 people/ Source: Computer Industry Almanac
單位: number
指標編號: 4.4.24
指標英文名稱: POLLUTION PROBLEMS 指標中文名稱: 汙染問題
解釋: Pollution problems do seriously affect your Economy / Pollution problems do not seriously affect your economy
單位: SURVEY
117
指標編號: 4.5.10
指標英文名稱: ENGLISH PROFICIENCY - TOEFL 指標中文名稱: 英文能力-托福
解釋: TOEFL scores
單位: mean scores
指標編號: 4.1.10
指標英文名稱: DEPENDENCY RATIO 指標中文名稱: 撫養比例
解釋: Population under 15 and over 64 years old, divided by active population (15 to 64 years)
單位: ratio
指標編號: 4.5.11
指標英文名稱: EDUCATIONAL SYSTEM 指標中文名稱: 教育系統
解釋: The educational system does not meet the needs of a competitive economy / The educational system meets the needs of a competitive economy
單位: SURVEY
指標編號: 4.5.13
指標英文名稱: UNIVERSITY EDUCATION 指標中文名稱: 大學教育
解釋: University education does not meet the needs of a competitive economy / University education meets the needs of a competitive economy
單位: SURVEY
118
附錄四 TAIWAN 與 CANADA、SWEDEN、KOREA 之相對雷達圖
(1) TAIWAN and CANADA i. 4.1 - Basic Infrastructure
圖 68TAIWAN and CANADA 之標準差
圖 69TAIWAN and CANADA 之落後程度 圖 70TAIWAN and CANADA 之領先程度
119
ii. 4.2 - Technological Infrastructure
圖 71TAIWAN and CANADA 之標準差
圖 72TAIWAN and CANADA 之落後程度 圖 73TAIWAN and CANADA 之領先程度
120
iii. 4.4 -Health and Environment
圖 74TAIWAN and CANADA 之標準差
圖 75TAIWAN and CANADA 之落後程度 圖 76TAIWAN and CANADA 之領先程度
121
iv. 4.5 - Education
圖 77TAIWAN and CANADA 之標準差
圖 78TAIWAN and CANADA 之落後程度 圖 79TAIWAN and CANADA 之領先程度
122
(2) TAIWAN and SWEDEN i. 4.1 - Basic Infrastructure
圖 80TAIWAN and SWEDEN 之標準差
圖 81TAIWAN and SWEDEN 之落後程度 圖 82TAIWAN and SWEDEN 之領先程度
123
ii. 4.2 - Technological Infrastructure
圖 83TAIWAN and SWEDEN 之標準差
圖 84TAIWAN and SWEDEN 之落後程度 圖 85TAIWAN and SWEDEN 之領先程度
124
iii. 4.4 -Health and Environment
圖 86TAIWAN and SWEDEN 之標準差
圖 87TAIWAN and SWEDEN 之落後程度 圖 88 TAIWAN and SWEDEN 之領先程度
125
iv. 4.5 - Education
圖 89TAIWAN and SWEDEN 之標準差
圖 90 TAIWAN and SWEDEN 之落後程度 圖 91 TAIWAN and SWEDEN 之領先程度
126
(3) TAIWAN and KOREA i. 4.1 - Basic Infrastructure
圖 92TAIWAN and KOREA 之標準差
圖 93TAIWAN and KOREA 之落後程度 圖 94TAIWAN and KOREA 之領先程度
127
ii. 4.2 - Technological Infrastructure
圖 95 TAIWAN and KOREA 之標準差
圖 96TAIWAN and KOREA 之落後程度 圖 97TAIWAN and KOREA 之領先程度
128
iii. 4.4 -Health and Environment
圖 98 TAIWAN and KOREA 之標準差
圖 99 TAIWAN and KOREA 之落後程度 圖 100 TAIWAN and KOREA 之領先程度
129
iv. 4.5 - Education
圖 101 TAIWAN and SWEDEN 之標準差
圖 102 TAIWAN and SWEDEN 之落後程度 圖 103 TAIWAN and SWEDEN 之領先程 度
130
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Data_arr4(200, 60), Data_arr5(200, 60), Data_arr6(200, 60), Data_arr7(200, 60) As Double
131
132
Data_arr1(i, j) = range.Value '標準化資料 Next
Next
sheet = book.Sheets(3) For i = 2 To num
For j = 2 To C_num
range = sheet.Cells(j, i)
Data_arr2(i, j) = range.Value '群集資料 Next
Next
sheet = book.Sheets(5) For i = 2 To num
range = sheet.Cells(2, i)
group(i) = range.Value '讀取分群群數 Next
For i = 2 To num
Select Case group(i)
'--- Case 3
'常態、非常態資料 sheet = book.Sheets(4)
' For i = 2 To 3 'i 為資料筆數 range = sheet.Cells(2, i) chkval1(i - 1) = range.Value range = sheet.Cells(3, i) chkval2(i - 1) = range.Value range = sheet.Cells(4, i) chkval3(i - 1) = range.Value For j = 2 To C_num
Select Case Data_arr2(i, j)
133
134
135
If c(i) Mod 2 = 1 Then '奇數
k = FormatNumber((c(i) / 2), 0) resutl2(i, 2) = Data_arr4(i, k) Else
k = Int(c(i) / 2) '偶數
resutl2(i, 2) = (Data_arr4(i, k) + Data_arr4(i, k + 1)) / 2
End If End Select tempval = 0
Select Case chkval3(i - 1) Case 1 '平均值
For j = 1 To d(i) '群組 2
tempval = Data_arr5(i, j) + tempval Next
resutl3(i, 2) = tempval / d(i) Case 0 '0 中位數
If d(i) Mod 2 = 1 Then '奇數
k = FormatNumber((d(i) / 2), 0) resutl3(i, 2) = Data_arr5(i, k) Else
k = Int(d(i) / 2) '偶數
resutl3(i, 2) = (Data_arr5(i, k) + Data_arr5(i, k + 1)) / 2
End If End Select
resutl1(i, 3) = Data_arr3(i, b(i)) resutl2(i, 3) = Data_arr4(i, c(i)) resutl3(i, 3) = Data_arr5(i, d(i)) '--- '領先距離
LDL(i) = resutl2(i, 2) - resutl3(i, 2) LDM(i) = resutl2(i, 3) - resutl3(i, 2) LDS(i) = resutl3(i, 1) - resutl3(i, 2)
136
'落後距離
BDL(i) = resutl1(i, 2) - resutl2(i, 2) BDM(i) = resutl1(i, 2) - resutl2(i, 1) BDS(i) = resutl1(i, 2) - resutl1(i, 3) '--- '寫入 Excel
sheet = book.Sheets(6) '最高國家
range = sheet.Cells(2, i) range.Value = resutl1(i, 1) range = sheet.Cells(3, i) range.Value = resutl2(i, 1) range = sheet.Cells(4, i) range.Value = resutl3(i, 1) '中間國家
range = sheet.Cells(8, i) range.Value = resutl1(i, 2) range = sheet.Cells(9, i) range.Value = resutl2(i, 2) range = sheet.Cells(10, i) range.Value = resutl3(i, 2) '最低國家
range = sheet.Cells(14, i) range.Value = resutl1(i, 3) range = sheet.Cells(15, i) range.Value = resutl2(i, 3) range = sheet.Cells(16, i) range.Value = resutl3(i, 3)
'--- '領先距離
range = sheet.Cells(20, i) range.Value = LDL(i) range = sheet.Cells(21, i) range.Value = LDM(i)
137
range = sheet.Cells(22, i) range.Value = LDS(i) '落後距離
range = sheet.Cells(24, i) range.Value = BDL(i) range = sheet.Cells(25, i) range.Value = BDM(i) range = sheet.Cells(26, i) range.Value = BDS(i)
'---
'--- Case 4
'MsgBox("四群") '常態、非常態資料 sheet = book.Sheets(4)
' For i = 2 To 3 'i 為資料筆數 range = sheet.Cells(2, i) chkval1(i - 1) = range.Value range = sheet.Cells(3, i) chkval2(i - 1) = range.Value range = sheet.Cells(4, i) chkval3(i - 1) = range.Value range = sheet.Cells(5, i) chkval4(i - 1) = range.Value 'Next
'各群組資料 ' For i = 2 To 3 For j = 2 To C_num
Select Case Data_arr2(i, j) Case 1
b(i) = b(i) + 1
Data_arr3(i, b(i)) = Data_arr1(i, j)
138
139
140
141
tempval = 0
Select Case chkval4(i - 1) Case 1 '平均值
For j = 1 To f(i) '群組 2
tempval = Data_arr6(i, j) + tempval Next
resutl4(i, 2) = tempval / f(i) Case 0 '0 中位數
If f(i) Mod 2 = 1 Then '奇數
k = FormatNumber((f(i) / 2), 0) resutl4(i, 2) = Data_arr6(i, k) Else
k = Int(f(i) / 2) '偶數
resutl4(i, 2) = (Data_arr6(i, k) + Data_arr6(i, k + 1)) / 2
End If End Select
'取最小值
resutl1(i, 3) = Data_arr3(i, b(i)) resutl2(i, 3) = Data_arr4(i, c(i)) resutl3(i, 3) = Data_arr5(i, d(i)) resutl4(i, 3) = Data_arr6(i, f(i)) '--- '領先距離
LDL(i) = resutl3(i, 1) - resutl4(i, 2) LDM(i) = resutl3(i, 2) - resutl4(i, 2) LDS(i) = resutl4(i, 1) - resutl4(i, 2) '落後距離
BDL(i) = resutl1(i, 2) - resutl2(i, 3) BDM(i) = resutl1(i, 2) - resutl2(i, 2) BDS(i) = resutl1(i, 2) - resutl1(i, 3)
142
'---
'---寫入 Excel--- sheet = book.Sheets(6)
'最高國家
range = sheet.Cells(2, i) range.Value = resutl1(i, 1) range = sheet.Cells(3, i) range.Value = resutl2(i, 1) range = sheet.Cells(4, i) range.Value = resutl3(i, 1) range = sheet.Cells(5, i) range.Value = resutl4(i, 1) '中間國家
range = sheet.Cells(8, i) range.Value = resutl1(i, 2) range = sheet.Cells(9, i) range.Value = resutl2(i, 2) range = sheet.Cells(10, i) range.Value = resutl3(i, 2) range = sheet.Cells(11, i) range.Value = resutl4(i, 2) '最低國家
range = sheet.Cells(14, i) range.Value = resutl1(i, 3) range = sheet.Cells(15, i) range.Value = resutl2(i, 3) range = sheet.Cells(16, i) range.Value = resutl3(i, 3) range = sheet.Cells(17, i) range.Value = resutl4(i, 3)
'--- '領先距離
range = sheet.Cells(20, i) range.Value = LDL(i)
143
range = sheet.Cells(21, i) range.Value = LDM(i) range = sheet.Cells(22, i) range.Value = LDS(i) '落後距離
range = sheet.Cells(24, i) range.Value = BDL(i) range = sheet.Cells(25, i) range.Value = BDM(i) range = sheet.Cells(26, i) range.Value = BDS(i)
'---
'--- Case 5
sheet = book.Sheets(4) range = sheet.Cells(2, i) chkval1(i - 1) = range.Value range = sheet.Cells(3, i) chkval2(i - 1) = range.Value range = sheet.Cells(4, i) chkval3(i - 1) = range.Value range = sheet.Cells(5, i) chkval4(i - 1) = range.Value range = sheet.Cells(6, i) chkval5(i - 1) = range.Value For j = 2 To C_num
Select Case Data_arr2(i, j) Case 1
b(i) = b(i) + 1
Data_arr3(i, b(i)) = Data_arr1(i, j) Case 2
c(i) = c(i) + 1
Data_arr4(i, c(i)) = Data_arr1(i, j)
144
145
Data_arr5(i, n) = Data_arr5(i, m) Data_arr5(i, m) = temp
End If Next Next
For m = 1 To f(i) For n = 1 To f(i)
If Data_arr6(i, n) < Data_arr6(i, m) Then temp = Data_arr6(i, n)
Data_arr6(i, n) = Data_arr6(i, m) Data_arr6(i, m) = temp
End If Next Next
For m = 1 To g(i) For n = 1 To g(i)
If Data_arr7(i, n) < Data_arr7(i, m) Then temp = Data_arr7(i, n)
Data_arr7(i, n) = Data_arr7(i, m) Data_arr7(i, m) = temp
End If Next Next
'---排序--- resutl1(i, 1) = Data_arr3(i, 1) resutl2(i, 1) = Data_arr4(i, 1) resutl3(i, 1) = Data_arr5(i, 1) resutl4(i, 1) = Data_arr6(i, 1) resutl5(i, 1) = Data_arr7(i, 1) tempval = 0
Select Case chkval1(i - 1) Case 1 '平均值
For j = 1 To b(i) '群組 2
tempval = Data_arr3(i, j) + tempval
146
147
148
k = FormatNumber((g(i) / 2), 0) resutl5(i, 2) = Data_arr7(i, k) Else
k = Int(g(i) / 2) '偶數
resutl5(i, 2) = (Data_arr7(i, k) + Data_arr7(i, k + 1)) / 2
End If End Select '取最小值
resutl1(i, 3) = Data_arr3(i, b(i)) resutl2(i, 3) = Data_arr4(i, c(i)) resutl3(i, 3) = Data_arr5(i, d(i)) resutl4(i, 3) = Data_arr6(i, f(i)) resutl5(i, 3) = Data_arr7(i, g(i)) '--- '領先距離
LDL(i) = resutl3(i, 2) - resutl5(i, 2) LDM(i) = resutl4(i, 2) - resutl5(i, 2) LDS(i) = resutl5(i, 1) - resutl5(i, 2) '落後距離
BDL(i) = resutl1(i, 2) - resutl3(i, 2) BDM(i) = resutl1(i, 2) - resutl2(i, 2) BDS(i) = resutl1(i, 2) - resutl1(i, 3) '--- '---寫入 Excel---
sheet = book.Sheets(6) '最高國家
range = sheet.Cells(2, i) range.Value = resutl1(i, 1) range = sheet.Cells(3, i) range.Value = resutl2(i, 1) range = sheet.Cells(4, i) range.Value = resutl3(i, 1)
149
range = sheet.Cells(5, i) range.Value = resutl4(i, 1) range = sheet.Cells(6, i) range.Value = resutl5(i, 1) '中間國家
range = sheet.Cells(8, i) range.Value = resutl1(i, 2) range = sheet.Cells(9, i) range.Value = resutl2(i, 2) range = sheet.Cells(10, i) range.Value = resutl3(i, 2) range = sheet.Cells(11, i) range.Value = resutl4(i, 2) range = sheet.Cells(12, i) range.Value = resutl5(i, 2) '最低國家
range = sheet.Cells(14, i) range.Value = resutl1(i, 3) range = sheet.Cells(15, i) range.Value = resutl2(i, 3) range = sheet.Cells(16, i) range.Value = resutl3(i, 3) range = sheet.Cells(17, i) range.Value = resutl4(i, 3) range = sheet.Cells(18, i) range.Value = resutl5(i, 3)
'--- '領先距離
range = sheet.Cells(20, i) range.Value = LDL(i) range = sheet.Cells(21, i) range.Value = LDM(i) range = sheet.Cells(22, i) range.Value = LDS(i)
150
'落後距離
range = sheet.Cells(24, i) range.Value = BDL(i) range = sheet.Cells(25, i) range.Value = BDM(i) range = sheet.Cells(26, i) range.Value = BDS(i)
'---
'--- End Select
Next
RichTextBox1.Text = RichTextBox1.Text & "領先與落後距離計算 完 成!!!" & vbCrLf
'---計算相對次數表部分--- '次數計算
For i = 1 To num
'領先程度長--- Select Case LDL(i)
Case LDL(i) = 0 To 0.3 LDLL(1) = LDLL(1) + 1 Case LDL(i) = 0.3 To 0.6 LDLL(2) = LDLL(2) + 1 Case LDL(i) = 0.3 To 0.9 LDLL(3) = LDLL(3) + 1 Case LDL(i) = 0.9 To 1.2 LDLL(4) = LDLL(4) + 1 Case LDL(i) = 1.2 To 1.5 LDLL(5) = LDLL(5) + 1 Case LDL(i) = 1.5 To 1.8 LDLL(6) = LDLL(6) + 1 Case LDL(i) = 1.8 To 2.1 LDLL(7) = LDLL(7) + 1 Case LDL(i) = 2.1 To 2.4
151
152
153
154
155
156
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close() End Sub
157
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim app As New Excel.Application Dim book As Excel.Workbook Dim sheet As Excel.Worksheet Dim range As Excel.Range app.DisplayAlerts = False app.Visible = False
Dim country_Name(60) As String Dim INname(200) As String Dim OCstd(200, 60) As Double Dim group(200) As Integer '群集數
Dim FC(200), LC(200) As Double '各國家要減去的值
Dim BS(200, 60), LS(200, 60) As Double '各國家的領先落後值
If System.IO.File.Exists(Application.StartupPath & "\IMD_Data.xlsx") Then If System.IO.File.Exists(Application.StartupPath & "\國家統計資 料.xlsx") Then
MsgBox("國家統計資料已存在") Else
book = app.Workbooks.Open(Application.StartupPath &
"\IMD_Data.xlsx")
sheet = book.Sheets(2) For i = 2 To num
For j = 2 To C_num
range = sheet.Cells(j, i)
OCstd(i, j) = range.Value '標準化資料 Next
Next
sheet = book.Sheets(5) For i = 2 To num
range = sheet.Cells(2, i)
group(i) = range.Value '群集資料 Next
158
159
160
161
Dim proc2 As System.Diagnostics.Process For Each proc2 In
System.Diagnostics.Process.GetProcessesByName("EXCEL") proc2.Kill()
Next
MsgBox("領先與落後級距計算完成!已建立「國家統計資料.xlsx」
")
'--- End If
Else
MsgBox("IMD_Data.xlsx 檔案不存在,執行結束!") End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim app As New Excel.Application Dim book As Excel.Workbook Dim sheet As Excel.Worksheet Dim range As Excel.Range app.DisplayAlerts = False app.Visible = False
Dim country_Name(200) As String Dim INname(200) As String
Dim LEFD(200, 60) As Double '領先模糊程度 Dim LAFD(200, 60) As Double '落後模糊程度 Dim ALAFD(200, 60) As Double '調整落後模糊程度 '將領先與落後程度資料 Input 到 VB 中
'將落後程度作調整,變成調整落後程度
If System.IO.File.Exists(Application.StartupPath & "\模糊程度.xlsx") Then If System.IO.File.Exists(Application.StartupPath & "\領先與調整落後模 糊統計.xlsx") Then
MsgBox("領先與調整落後模糊統計已存在") Else
book = app.Workbooks.Open(Application.StartupPath & "\模糊程
162
度.xlsx")
'---Input Data--- sheet = book.Sheets(3)
For i = 2 To num
range = sheet.Cells(1, i) INname(i) = range.Value For j = 2 To C_num
range = sheet.Cells(j, i)
LEFD(i, j) = range.Value '領先模糊程度 Next
Next
sheet = book.Sheets(2) For i = 2 To num
For j = 2 To C_num
range = sheet.Cells(j, i)
LAFD(i, j) = range.Value '落後模糊程度 Next
Next
sheet = book.Sheets(1) For i = 2 To C_num
range = sheet.Cells(i, 2)
country_Name(i) = range.Value Next
'---中間計算--- For i = 2 To num
For j = 2 To C_num
ALAFD(i, j) = 8.7 - LAFD(i, j) Next
Next
book.Close() app.Quit() '釋放記憶體
System.Runtime.InteropServices.Marshal.ReleaseComObject(app) sheet = Nothing
163
164
range = sheet.Cells(1, 1) range.Value = "落後程度"
sheet.Name = "落後程度"
sheet.Name = "落後程度"