PowerDesigner導出表為Excel(轉)

打開腳本運行器Ctrl+Shift+X

導出:

'******************************************************************************
Option ExplicitDim rowsNumrowsNum = 0
'-----------------------------------------------------------------------------
' Main function
'-----------------------------------------------------------------------------
' Get the current active modelDim ModelSet Model = ActiveModelIf (Model Is Nothing) Or (Not Model.IsKindOf(PdPDM.cls_Model)) ThenMsgBox "The current model is not an PDM model."Else' Get the tables collection'創建EXCEL APPdim beginrowDIM EXCEL, SHEET, SHEETLISTset EXCEL = CREATEOBJECT("Excel.Application")EXCEL.workbooks.add(-4167)'添加工作表EXCEL.workbooks(1).sheets(1).name ="表結構"set SHEET = EXCEL.workbooks(1).sheets("表結構")EXCEL.workbooks(1).sheets.addEXCEL.workbooks(1).sheets(1).name ="目錄"set SHEETLIST = EXCEL.workbooks(1).sheets("目錄")ShowTableList Model,SHEETLISTShowProperties Model, SHEET,SHEETLISTEXCEL.workbooks(1).Sheets(2).SelectEXCEL.visible = true'設置列寬和自動換行sheet.Columns(1).ColumnWidth = 20 sheet.Columns(2).ColumnWidth = 20 sheet.Columns(3).ColumnWidth = 20 sheet.Columns(4).ColumnWidth = 40 sheet.Columns(5).ColumnWidth = 10 sheet.Columns(6).ColumnWidth = 10 sheet.Columns(1).WrapText =truesheet.Columns(2).WrapText =truesheet.Columns(4).WrapText =true'不顯示網格線EXCEL.ActiveWindow.DisplayGridlines = FalseEnd If
'-----------------------------------------------------------------------------
' Show properties of tables
'-----------------------------------------------------------------------------
Sub ShowProperties(mdl, sheet,SheetList)' Show tables of the current model/packagerowsNum=0beginrow = rowsNum+1Dim rowIndex rowIndex=3' For each tableoutput "begin"Dim tabFor Each tab In mdl.tablesShowTable tab,sheet,rowIndex,sheetListrowIndex = rowIndex +1Nextif mdl.tables.count > 0 thensheet.Range("A" & beginrow + 1 & ":A" & rowsNum).Rows.Groupend ifoutput "end"
End Sub
'-----------------------------------------------------------------------------
' Show table properties
'-----------------------------------------------------------------------------
Sub ShowTable(tab, sheet,rowIndex,sheetList)If IsObject(tab) ThenDim rangFlagrowsNum = rowsNum + 1' Show propertiesOutput "================================"sheet.cells(rowsNum, 1) =tab.namesheet.cells(rowsNum, 1).HorizontalAlignment=3sheet.cells(rowsNum, 2) = tab.code'sheet.cells(rowsNum, 5).HorizontalAlignment=3'sheet.cells(rowsNum, 6) = ""'sheet.cells(rowsNum, 7) = "表說明"sheet.cells(rowsNum, 3) = tab.comment'sheet.cells(rowsNum, 8).HorizontalAlignment=3sheet.Range(sheet.cells(rowsNum, 3),sheet.cells(rowsNum, 7)).Merge'設置超鏈接,從目錄點擊表名去查看表結構'字段中文名    字段英文名    字段類型    注釋    是否主鍵    是否非空    默認值sheetList.Hyperlinks.Add sheetList.cells(rowIndex,2), "","表結構"&"!B"&rowsNumrowsNum = rowsNum + 1sheet.cells(rowsNum, 1) = "字段中文名"sheet.cells(rowsNum, 2) = "字段英文名"sheet.cells(rowsNum, 3) = "字段類型"sheet.cells(rowsNum, 4) = "注釋"sheet.cells(rowsNum, 5) = "是否主鍵"sheet.cells(rowsNum, 6) = "是否非空"sheet.cells(rowsNum, 7) = "默認值"'設置邊框sheet.Range(sheet.cells(rowsNum-1, 1),sheet.cells(rowsNum, 7)).Borders.LineStyle = "1"'sheet.Range(sheet.cells(rowsNum-1, 4),sheet.cells(rowsNum, 9)).Borders.LineStyle = "1"'字體為10號sheet.Range(sheet.cells(rowsNum-1, 1),sheet.cells(rowsNum, 7)).Font.Size=10Dim col ' running columnDim colsNumcolsNum = 0for each col in tab.columnsrowsNum = rowsNum + 1colsNum = colsNum + 1sheet.cells(rowsNum, 1) = col.name'sheet.cells(rowsNum, 3) = ""'sheet.cells(rowsNum, 4) = col.namesheet.cells(rowsNum, 2) = col.codesheet.cells(rowsNum, 3) = col.datatypesheet.cells(rowsNum, 4) = col.commentIf col.Primary = true Thensheet.cells(rowsNum, 5) = "Y" Elsesheet.cells(rowsNum, 5) = " " End IfIf col.Mandatory = true Thensheet.cells(rowsNum, 6) = "Y" Elsesheet.cells(rowsNum, 6) = " " End Ifsheet.cells(rowsNum, 7) =  col.defaultvaluenextsheet.Range(sheet.cells(rowsNum-colsNum+1,1),sheet.cells(rowsNum,7)).Borders.LineStyle = "3"       'sheet.Range(sheet.cells(rowsNum-colsNum+1,4),sheet.cells(rowsNum,9)).Borders.LineStyle = "3"sheet.Range(sheet.cells(rowsNum-colsNum+1,1),sheet.cells(rowsNum,7)).Font.Size = 10rowsNum = rowsNum + 2Output "FullDescription: "       + tab.NameEnd IfEnd Sub
'-----------------------------------------------------------------------------
' Show List Of Table
'-----------------------------------------------------------------------------
Sub ShowTableList(mdl, SheetList)' Show tables of the current model/package
   Dim rowsNorowsNo=1' For each tableoutput "begin"SheetList.cells(rowsNo, 1) = "主題"SheetList.cells(rowsNo, 2) = "表中文名"SheetList.cells(rowsNo, 3) = "表英文名"SheetList.cells(rowsNo, 4) = "表說明"rowsNo = rowsNo + 1SheetList.cells(rowsNo, 1) = mdl.nameDim tabFor Each tab In mdl.tablesIf IsObject(tab) ThenrowsNo = rowsNo + 1SheetList.cells(rowsNo, 1) = ""SheetList.cells(rowsNo, 2) = tab.nameSheetList.cells(rowsNo, 3) = tab.codeSheetList.cells(rowsNo, 4) = tab.commentEnd IfNextSheetList.Columns(1).ColumnWidth = 20 SheetList.Columns(2).ColumnWidth = 20 SheetList.Columns(3).ColumnWidth = 30 SheetList.Columns(4).ColumnWidth = 60 output "end"
End Sub

導入:

'******************************************************************************
'開始
Option Explicit
Dim tab_name,tab_code,tab_comment
Dim b_r, e_r, s_r, j, m, n
Dim mdl ' the current model
dim count
Dim HaveExcel
Dim RQ
Dim file_name,WScript
Set mdl = ActiveModel
If (mdl Is Nothing) ThenMsgBox "There is no Active Model"
End If
RQ = vbYes 'MsgBox("Is Excel Installed on your machine ?", vbYesNo + vbInformation, "Confirmation")
If RQ = vbYes ThenHaveExcel = True' Open & Create Excel Document
ElseHaveExcel = False
End If
file_name = selectFile() 
if file_name <> "" thenDim x1  'Set x1 = CreateObject("Excel.Application")x1.Workbooks.Open file_name    '指定excel文檔路徑x1.Workbooks(1).Worksheets("表結構").Activate   '指定要打開的sheet名稱
j = 1
do while n < 11
if x1.Workbooks(1).Worksheets("表結構").cells(j,1).value <> "" then
call a(x1, mdl, j, getRow(x1, j))
'msgbox j & "--" & getRow(x1, j)
count = count + 1
j = getRow(x1, j)
n = 0
end if
j = j + 1
n = n + 1
loop
'MsgBox "生成數據表結構共計 " + CStr(count), vbOK + vbInformation, "表 導入完畢!"
MsgBox "生成數據表結構共計 " & CStr(count) & " 表導入完畢!"
x1.Workbooks(1).close
x1.quit
else
msgbox "沒有選擇文件!"
end ifsub a(x1, mdl, r_0,r_9)
dim rwIndex   
dim tableName
dim colname
dim table
dim coltab_name = ucase(x1.Workbooks(1).Worksheets("表結構").cells(r_0,1).value)    '指定表名,如果在Excel文檔里有,也可以 .Cells(rwIndex, 3).Value 這樣指定
tab_code = ucase(x1.Workbooks(1).Worksheets("表結構").cells(r_0,2).value)  '指定表名
tab_comment = ucase(x1.Workbooks(1).Worksheets("表結構").cells(r_0,3).value)on error Resume Next
set table = mdl.Tables.CreateNew '創建一個表實體
table.Name = tab_name
table.Code = tab_code
table.Comment = tab_commentFor rwIndex = r_0 + 2 To r_9   '指定要遍歷的Excel行標  由于第1行是表頭,從第2行開始With x1.Workbooks(1).Worksheets("表結構")If .Cells(rwIndex, 2).Value = "" ThenExit ForEnd Ifset col = table.Columns.CreateNew   '創建一列/字段'MsgBox .Cells(rwIndex, 1).Value, vbOK + vbInformation, "列"If .Cells(rwIndex, 1).Value = "" Thencol.Name = ucase(.Cells(rwIndex, 2).Value)   '指定列名Else col.Name = ucase(.Cells(rwIndex, 1).Value)End If'MsgBox col.Name, vbOK + vbInformation, "列"col.Code = ucase(.Cells(rwIndex, 2).Value)   '指定列名col.DataType = ucase(.Cells(rwIndex, 3).Value)   '指定列數據類型col.Comment = ucase(.Cells(rwIndex, 4).Value)  '指定列說明If ucase(.Cells(rwIndex, 5).Value) = "Y" Thencol.Primary = true    '指定主鍵col.defaultvalue = ucase(.Cells(rwIndex,7).value)End If If ucase(.Cells(rwIndex,6).value) = "Y" thencol.defaultvalue = ucase(.Cells(rwIndex,7).value)col.Mandatory = true                End IfEnd With
Next
End subFunction getRow(x1, s_r)
dim i, k
k = s_r
do while x1.Workbooks(1).Worksheets("表結構").cells(k,1).value <> ""
k = k + 1
if x1.Workbooks(1).Worksheets("表結構").cells(k,1).value = "" then
getRow = k - 1
exit function
end if
loop
End Function
Function SelectFile()Dim shell : Set shell = CreateObject("WScript.Shell")Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")Dim tempFolder : Set tempFolder = fso.GetSpecialFolder(2)Dim tempName : tempName = fso.GetTempName()Dim tempFile : Set tempFile = tempFolder.CreateTextFile(tempName & ".hta")tempFile.Write _"<html>" & _"<head>" & _"<title>Browse</title>" & _"</head>" & _"<body>" & _"<input type='file' id='f' />" & _"<script type='text/javascript'>" & _"var f = document.getElementById('f');" & _"f.click();" & _"var shell = new ActiveXObject('WScript.Shell');" & _"shell.RegWrite('HKEY_CURRENT_USER\\Volatile Environment\\MsgResp', f.value);" & _"window.close();" & _"</script>" & _"</body>" & _"</html>"tempFile.Closeshell.Run tempFolder & "\" & tempName & ".hta", 0, TrueSelectFile = shell.RegRead("HKEY_CURRENT_USER\Volatile Environment\MsgResp")shell.RegDelete "HKEY_CURRENT_USER\Volatile Environment\MsgResp"
End Function

其它:

所有表同在一個Sheet

Option ExplicitDim rowsNumrowsNum = 0
'-----------------------------------------------------------------------------
' Main function
'-----------------------------------------------------------------------------
' Get the current active model
Dim Model
Set Model = ActiveModel
If (Model Is Nothing) Or (Not Model.IsKindOf(PdPDM.cls_Model)) ThenMsgBox "The current model is not an PDM model."
Else' Get the tables collection'創建EXCEL APPdim beginrowDIM EXCEL, SHEETset EXCEL = CREATEOBJECT("Excel.Application")EXCEL.workbooks.add(-4167)'添加工作表EXCEL.workbooks(1).sheets(1).name ="test"set sheet = EXCEL.workbooks(1).sheets("test")ShowProperties Model, SHEETEXCEL.visible = true'設置列寬和自動換行sheet.Columns(1).ColumnWidth = 20 sheet.Columns(2).ColumnWidth = 40 sheet.Columns(4).ColumnWidth = 20 sheet.Columns(5).ColumnWidth = 20 sheet.Columns(6).ColumnWidth = 15 sheet.Columns(1).WrapText =truesheet.Columns(2).WrapText =truesheet.Columns(4).WrapText =trueEnd If
'-----------------------------------------------------------------------------
' Show properties of tables
'-----------------------------------------------------------------------------
Sub ShowProperties(mdl, sheet)' Show tables of the current model/packagerowsNum=0beginrow = rowsNum+1' For each tableoutput "begin"Dim tabFor Each tab In mdl.tablesShowTable tab,sheetNextif mdl.tables.count > 0 thensheet.Range("A" & beginrow + 1 & ":A" & rowsNum).Rows.Groupend ifoutput "end"
End Sub
'-----------------------------------------------------------------------------
' Show table properties
'-----------------------------------------------------------------------------
Sub ShowTable(tab, sheet)If IsObject(tab) ThenDim rangFlagrowsNum = rowsNum + 1' Show propertiesOutput "================================"sheet.cells(rowsNum, 1) = "實體名"sheet.cells(rowsNum, 2) =tab.namesheet.cells(rowsNum, 3) = ""sheet.cells(rowsNum, 4) = "表名"sheet.cells(rowsNum, 5) = tab.codesheet.Range(sheet.cells(rowsNum, 5),sheet.cells(rowsNum, 6)).MergerowsNum = rowsNum + 1sheet.cells(rowsNum, 1) = "屬性名"sheet.cells(rowsNum, 2) = "說明"sheet.cells(rowsNum, 3) = ""sheet.cells(rowsNum, 4) = "字段中文名"sheet.cells(rowsNum, 5) = "字段名"sheet.cells(rowsNum, 6) = "字段類型"'設置邊框sheet.Range(sheet.cells(rowsNum-1, 1),sheet.cells(rowsNum, 2)).Borders.LineStyle = "1"sheet.Range(sheet.cells(rowsNum-1, 4),sheet.cells(rowsNum, 6)).Borders.LineStyle = "1"
Dim col ' running column
Dim colsNum
colsNum = 0for each col in tab.columnsrowsNum = rowsNum + 1colsNum = colsNum + 1sheet.cells(rowsNum, 1) = col.namesheet.cells(rowsNum, 2) = col.commentsheet.cells(rowsNum, 3) = ""sheet.cells(rowsNum, 4) = col.namesheet.cells(rowsNum, 5) = col.codesheet.cells(rowsNum, 6) = col.datatypenextsheet.Range(sheet.cells(rowsNum-colsNum+1,1),sheet.cells(rowsNum,2)).Borders.LineStyle = "2"       sheet.Range(sheet.cells(rowsNum-colsNum+1,4),sheet.cells(rowsNum,6)).Borders.LineStyle = "2"rowsNum = rowsNum + 1Output "FullDescription: "       + tab.NameEnd If
End Sub

每個表一個Sheet

Option Explicit   Dim rowsNum   rowsNum = 0   
'-----------------------------------------------------------------------------   
' Main function   
'-----------------------------------------------------------------------------   
' Get the current active model   
Dim Model   
Set Model = ActiveModel   
If (Model Is Nothing) Or (Not Model.IsKindOf(PdPDM.cls_Model)) Then   MsgBox "The current model is not an PDM model."   
Else   ' Get the tables collection   '創建EXCEL APP   Dim beginrow  Dim EXCEL, BOOK, SHEET  Set EXCEL = CreateObject("Excel.Application")  EXCEL.Visible = True  Set BOOK = EXCEL.Workbooks.Add(-4167) '新建工作簿  BOOK.Sheets(1).Name = "數據庫表結構"  Set SHEET = EXCEL.workbooks(1).sheets("數據庫表結構")  ShowProperties Model, SHEET  EXCEL.visible = true   '設置列寬和自動換行   SHEET.Columns(1).ColumnWidth = 10     SHEET.Columns(2).ColumnWidth = 30     SHEET.Columns(3).ColumnWidth = 20     SHEET.Columns(1).WrapText =true   SHEET.Columns(2).WrapText =true   SHEET.Columns(3).WrapText =true   End If  '-----------------------------------------------------------------------------   
' Show properties of tables   
'-----------------------------------------------------------------------------   
Sub ShowProperties(mdl, sheet)   ' Show tables of the current model/package   rowsNum=0   beginrow = rowsNum+1   ' For each table   output "begin"   Dim tab   For Each tab In mdl.tables   ShowTable tab,sheet   Next   if mdl.tables.count > 0 then   sheet.Range("A" & beginrow + 1 & ":A" & rowsNum).Rows.Group   end if   output "end"   
End Sub  '-----------------------------------------------------------------------------   
' 數據表查詢   
'-----------------------------------------------------------------------------  
Sub ShowTable(tab, sheet)     If IsObject(tab) Then   Dim rangFlag  sheet.cells(1, 1) = "序號"   sheet.cells(1, 2) = "表名"  sheet.cells(1, 3) = "實體名"  '設置邊框   sheet.Range(sheet.cells(1, 1),sheet.cells(1, 3)).Borders.LineStyle = "1"  '設置背景顏色  sheet.Range(sheet.cells(1, 1),sheet.cells(1, 3)).Interior.ColorIndex = "19"  rowsNum = rowsNum + 1  sheet.cells(rowsNum+1, 1) = rowsNum   sheet.cells(rowsNum+1, 2) = tab.code  sheet.cells(rowsNum+1, 3) = tab.name  '設置邊框  sheet.Range(sheet.cells(rowsNum+1,1),sheet.cells(rowsNum+1,3)).Borders.LineStyle = "2"  '增加Sheet  BOOK.Sheets.Add , BOOK.Sheets(BOOK.Sheets.count)  BOOK.Sheets(rowsNum+1).Name = tab.code   Dim shtn  Set shtn = EXCEL.workbooks(1).sheets(tab.code)  '設置列寬和換行  shtn.Columns(1).ColumnWidth = 30     shtn.Columns(2).ColumnWidth = 20     shtn.Columns(3).ColumnWidth = 20  shtn.Columns(5).ColumnWidth = 30     shtn.Columns(6).ColumnWidth = 20     shtn.Columns(1).WrapText =true   shtn.Columns(2).WrapText =true   shtn.Columns(3).WrapText =true  shtn.Columns(5).WrapText =true   shtn.Columns(6).WrapText =true  '設置列標題  shtn.cells(1, 1) = "字段中文名"   shtn.cells(1, 2) = "字段名"  shtn.cells(1, 3) = "字段類型"  shtn.cells(1, 5) = tab.code  shtn.cells(1, 6) = tab.Name  '設置邊框   shtn.Range(shtn.cells(1, 1),shtn.cells(1, 3)).Borders.LineStyle = "1"  shtn.Range(shtn.cells(1, 5),shtn.cells(1, 6)).Borders.LineStyle = "1"  '設置背景顏色  shtn.Range(shtn.cells(1, 1),shtn.cells(1, 3)).Interior.ColorIndex = "19"  shtn.Range(shtn.cells(1, 5),shtn.cells(1, 6)).Interior.ColorIndex = "19"  Dim col ' running column   Dim colsNum  Dim rNum   colsNum = 0  rNum = 0   for each col in tab.columns   rNum = rNum + 1   colsNum = colsNum + 1   shtn.cells(rNum+1, 1) = col.name   shtn.cells(rNum+1, 2) = col.code   shtn.cells(rNum+1, 3) = col.datatype   next   shtn.Range(shtn.cells(rNum-colsNum+2,1),shtn.cells(rNum+1,3)).Borders.LineStyle = "2"           rNum = rNum + 1   Output "FullDescription: "       + tab.Name  End If     
End Sub  

?

參考:

https://www.cnblogs.com/chenz/articles/3456340.html(以上內容轉自此篇文章)

https://blog.csdn.net/Bin594505536/article/details/50517573(以上內容轉自此篇文章)

==>如有問題,請聯系我:easonjim#163.com,或者下方發表評論。<==

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/538546.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/538546.shtml
英文地址,請注明出處:http://en.pswp.cn/news/538546.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

判讀一個對象不為空_ArrayList實現分析(一)——對象創建

ArrayList是java中最常用的集合類之一&#xff0c;它的內部實現是基于數組&#xff0c;因此ArryList可以根據索引實現隨機訪問。ArryList繼承了AbstractList類&#xff0c;并且實現了List, RandomAccess, Cloneable接口。下面詳細分析一下ArrayList的實現&#xff0c;下面的分析…

AngularJS與Angular的區別

指同一事物&#xff0c;版本的區別&#xff0c;叫法不同 Angular2.0之前的版本&#xff08;1.x&#xff09;叫做AngularJS 1.x的使用是引入AngularJS的js文件到網頁。 2.0之后&#xff0c;就是完全不同了。 Angular2.x與Angular1.x 的區別類似 Java 和 JavaScript 或者說是…

網頁控制臺調用click()失敗_C# 調用百度AI 人臉識別

一、設置登錄百度云控制臺&#xff0c;添加應用-添加人臉識別&#xff0c;查找&#xff0c;對比等。設置人臉識別應用記住API Key和Secret Key二、創建Demo程序1、使用Nuget安裝 Baidu.AI 和 Newtonsoft.JsonNuget2、直接下載SDK https://ai.baidu.com/file/7D961BC013AB4AA790…

mysql查看服務器CPU和內存_怎么查看服務器的cpu和內存的硬件信息

可以按照如下方式進行操作&#xff1a;一、查看cpu總個數方法&#xff1a;1、首先執行top命令&#xff0c;如下圖中內容所表示。2、在top命令的顯示界面&#xff0c;按數字鍵1&#xff0c;即可查看到當前系統中的總cpu數&#xff0c;如下圖中內容所表示。二、查看總內存的方法&…

內核模式下的文件操作

內核模式下的文件操作 轉載于:https://www.cnblogs.com/endenvor/p/9119495.html

極光推送指定用戶推送_干貨|SpringBoot集成極光推送完整實現代碼(建議收藏)...

工作中經常會遇到服務器向App推送消息的需求&#xff0c;一般企業中選擇用極光推送的比較多&#xff0c;在集成極光時發現極光的文檔并不完整&#xff0c;網上的文章也很多不能直接使用&#xff0c;這里列出我在工作中集成極光的全部代碼&#xff0c;只需要按照如下代碼保證一次…

什么是ES6?

什么是ES6&#xff1f; ECMAScript 6&#xff08;以下簡稱ES6&#xff09;是JavaScript語言的下一代標準&#xff0c;已經在2015年6月正式發布了。Mozilla公司將在這個標準的基礎上&#xff0c;推出JavaScript 2.0。   ECMAScript和JavaScript到底是什么關系&#xff1f;很多…

Babylon-AST初探-代碼更新刪除(Update Remove)

通過前兩篇文章的介紹&#xff0c;大家已經了解了Create和Retrieve&#xff0c;我們接著介紹Update和 Remove操作。Update操作通常配合Create來完成。我們這篇文章主要介紹幾個常用的NodePathAPI&#xff1a;replace、insert、remove。具體也可以看babel-handbook中的Manipulat…

python中時間間隔默認單位是什么_Python時間增量(以年為單位)

你需要不止一個timedelta來說明多少年過去了&#xff1b;你還需要知道開始(或結束)日期。(這是閏年的事。)最好的方法是使用dateutil.relativedeltaobject&#xff0c;但這是第三方模塊。如果您想知道從某個日期起的datetime年(默認為現在)&#xff0c;可以執行以下操作&#x…

編解碼異常分析

前言 最近在做的項目&#xff0c;有H264解碼的需求。部分H264文件解碼播放后&#xff0c;顯示為綠屏或者花屏。 分析 如何確認是否是高通硬解碼的問題 adb 指令 adb root adb remount adb shell setenforce 0 adb shell setprop vendor.gralloc.disable_ubwc 1 adb shell c…

python讀取數據庫導出文件_python如何導出excel表格數據庫數據

{"moduleinfo":{"card_count":[{"count_phone":1,"count":1}],"search_count":[{"count_phone":4,"count":4}]},"card":[{"des":"阿里云數據庫專家保駕護航&#xff0c;為用戶…

mysql堆溢出_為什么這個MySQL觸發器會導致堆棧溢出?

我今天遇到了同樣的問題,每次觸發都會導致堆棧溢出.原來我的Zend社區服務器安裝附帶了一個默認的my.cnf文件,其中thread_stack大小設置為128K,這導致每個線程中可用于堆棧的131072字節&#xff1a;mysql> show variables where Variable_name thread_stack;---------------…

MySQL定義數據庫對象之指定definer

mysql創建view、trigger、function、procedure、event時都會定義一個Definer: SQL SECURITY 有兩個選項&#xff0c;一個為DEFINER&#xff0c;一個為INVOKER&#xff1b;SQL SECURITY { DEFINER | INVOKER } &#xff1a;指明誰有權限來執行。DEFINER 表示按定義者擁有的權限來…

js根據name獲取value_js 函數的重載

js 函數的重載我們知道&#xff0c;很多編程語言都有函數的重載。所謂的重載&#xff0c;看定義&#xff1a;重載&#xff0c;簡單說&#xff0c;就是函數或者方法有相同的名稱&#xff0c;但是參數列表不相同的情形&#xff0c;這樣的同名不同參數的函數或者方法之間&#xff…

python調用菜單響應事件_[Python] wxpython 編程觸發菜單或按鈕事件

最近逐步熟悉wxpython&#xff0c;編寫了幾個小小功能的GUI程序&#xff0c;GUI中免不了會有在代碼中觸發控件事件的業務需求。在其他Gui界面的語言中有postevent、triggerevent 調用事件名稱的函數&#xff0c;非常方便。在wxpython里如何解決呢&#xff0c;上一段簡單的代碼。…

Angular CLI 使用教程指南參考

原文鏈接&#xff1a;http://www.cnblogs.com/bh4lm/p/6638057.html 點擊閱讀原文 ----------------------------------------------- Angular CLI 使用教程指南參考 Angular CLI 現在雖然可以正常使用但仍然處于測試階段. Angular CLI 依賴 Node 4 和 NPM 3 或更高版本. 安裝…

存儲過程循環遍歷一個月的每一天的函數_JavaScript 循環:如何處理 async/await

同步循環很久以前我寫的循環是這樣的&#xff1a;后來 JavaScript 提供了很多新的特性&#xff0c;現在我們會更傾向于用下面這種寫法&#xff1a;在開發過程可能會有這么一種需求&#xff0c;我們需要在循環中異步處理 item&#xff0c;那么可以怎么做呢&#xff1f;異步循環如…

Angular程序架構

component&#xff0c;組件是Angular應用的基本構建塊&#xff0c;你可以把一個組件理解為一段帶有業務邏輯和數據的html。組件下面可以有子組件&#xff0c;子組件下有孫子組件&#xff0c;像樹一樣。指令&#xff1a;允許你向html元素添加自定義行為。模塊Ngmodule&#xff1…

sqllite能連接mysql_SQLLite 可以通過SQL語言來訪問的文件型SQL數據庫

Web Storage分為兩類&#xff1a;- sessionStorage&#xff1a;數據保存在session 對象中(臨時)- localStorage&#xff1a;數據保存在本地硬件設備中(永久)sessionStorage:保存數據的兩種方法&#xff1a;sessionStorage.setItem(key,val);sessionStorage.key val;讀取數據的…

迭代器模式(Iterator)

迭代器模式 一. 迭代器模式 1.1 定義 提供一種方法順序訪問一個集合對象中的各種元素&#xff0c;而又不暴露該對象的內部表示.1.2 角色 抽象迭代器接口&#xff08;Iterator&#xff09;.具體迭代器&#xff08;ConcreteIterator&#xff09;.抽象聚合接口&#xff08;Aggrega…