Add(MainForm,2953706,77,147)
{
Width=626
Height=643
}
Add(ChildPanel,6304782,231,147)
{
@Hint=#5:Прайс|
link(onEvent1,8268735:doAdd,[])
}
BEGIN_SDK
Add(EditMulti,13873045,21,21)
{
EventCount=2
WorkCount=1
Width=860
Height=655
link(doWork1,11410566:doEvent1,[(45,27)(45,202)])
}
Add(Panel,14000364,63,28)
{
Left=625
Top=15
Width=214
Height=144
Visible=1
Layout="parent.vert"
}
Add(FormatStr,15762674,315,119)
{
Mask="Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};\r\nDriverID=22;\r\nDBQ=%1;\r\nDefaultDir=%2;\r\nFirstRowWhasNames=1;\r\nReadOnly=true;\r\nScanRows=0;"
Point(FString)
link(Str2,16353759:Var2,[])
}
Add(OLEdb,3042347,175,280)
{
Point(onError)
link(onConnect,15799951:doCreate,[])
link(Driver,15762674:FString,[(181,186)(321,186)])
link(onError,6281013:doMessage,[(219,293)(219,314)(163,314)(163,335)])
}
Add(OLEdb_Session,15799951,238,280)
{
Point(onError)
link(onError,3395621:doMessage,[(278,293)(278,307)])
}
Add(FormatStr,5978579,427,287)
{
Mask="SELECT * FROM "%2"."%1$A4:D" "%1$";"
link(onFString,6949883:doQuery,[(471,293)(471,342)(226,342)(226,391)])
link(Str1,4870236:String,[])
link(Str2,16353759:Var3,[(440,103)])
}
Add(VBJScript,345803,315,210)
{
@Hint=#16:Query SQL Server|
WorkPoints=#6:doOpen|7:doSheet|7:doClose|
EventPoints=#8:onSheets|6:onOpen|
Script=#9:Dim strIn|5:Dim i|5:Dim j|12:Dim objExcel|11:Dim onExcel|0:|22:Sub doWork(Data,Index)|18: Select Case Index|15: Case "doOpen"|52: Set objExcel = CreateObject("Excel.Application")|52: Set objWorkbook = objExcel.Workbooks.Open (Data)|71: j = objWorkbook.Sheets.Count 'Узнаём количество листов|88: For i=1 To j 'Листы начинаются не с "0", а с "1" |86: strIn = objWorkbook.Sheets(i).Name 'Узнаём имя очередного листа |65: sys.onSheets strIn 'Выводим имя наружу|9: Next|17: sys.onOpen 1 |94: 'Case "doSheet" 'На вход подаётся строка, содержащая имя Листа|33: 'objExcel.Sheets(Data).Select|38: 'objExcel.ActiveSheet.Cells.Select|43: 'objExcel.Selection.NumberFormat = "@" |39: 'objExcel.ActiveWorkbook.Save() |17: Case "doClose"|17: objExcel.Quit|26: Set objExcel = Nothing|17: sys.onOpen 0 |0:|11: End Select|0:|7:End Sub|
UseName=0
link(onSheets,4870236:doAdd,[])
}
Add(Hub,45852,280,203)
{
OutCount=4
link(onEvent1,15762674:doString,[(304,209)(304,125)])
link(onEvent2,345803:doOpen,[])
link(onEvent3,345803:doClose,[(304,223)(304,230)])
link(onEvent4,7883240:doText,[(301,230)(301,244)])
}
Add(Hub,11410566,70,196)
{
OutCount=4
link(onEvent1,2139596:doValue,[(203,202)(203,62)])
link(onEvent2,45852:doEvent1,[])
link(onEvent3,3042347:doOpen,[(130,216)(130,286)])
link(onEvent4,5978579:doString,[(256,223)(256,293)])
}
Add(OLEdb_Query,6949883,238,385)
{
link(onQuery,9619184:doEvent1,[])
link(onColumns,9619184:doEvent2,[])
link(onError,11907218:doMessage,[(296,405)(296,440)])
link(dbSession,15799951:dbSession,[])
}
Add(GetDataEx,16353759,322,98)
{
link(Data,2139596:Value,[])
}
Add(StrList,4870236,406,210)
{
Point(String)
Point(doGetString)
}
Add(VisualStrings,7883240,364,238)
{
Lines=#1:0|
Width=18
Point(doText)
Point(onText)
link(onText,4870236:doGetString,[])
}
Add(Message,11907218,322,434)
{
Caption="3"
Icon=1
}
Add(Message,6281013,175,329)
{
Caption="1"
Icon=1
}
Add(Message,3395621,287,301)
{
Caption="2"
Icon=1
}
Add(Memory,2139596,322,56)
{
}
Add(MT_String,3709045,322,385)
{
link(onResult,13873045:onEvent1,[(618,391)(618,27)])
}
Add(Hub,9619184,287,385)
{
InCount=2
OutCount=1
link(onEvent1,3709045:doStr,[])
}
END_SDK
Add(Button,4982637,133,147)
{
Left=5
Top=5
Caption=" Open"
link(onClick,10622552:doExecute,[])
}
Add(ODialog,10622552,182,147)
{
link(onExecute,6304782:doWork1,[])
}
Add(Memo,8268735,280,147)
{
Left=10
Top=35
Width=590
Height=565
ScrollBars=3
}
Редактировалось 1 раз(а), последний 2020-08-30 09:36:12