Вверх ↑
Ответов: 14
Рейтинг: 0
#1: 2008-08-22 13:41:42 ЛС | профиль | цитата

#sha
Add(MainForm,16078593,35,77)
{
Left=20
Top=105
Width=868
Height=643
Caption="xls"
}
Add(ODialog,16073511,91,126)
{
Filter="*.xls|*.xls|All|*.*"
link(onExecute,11221787:doEvent1,[])
}
Add(VBJScript,7134762,238,182)
{
@Hint=#16:Query SQL Server|
WorkPoints=#6:doWork|
EventPoints=#7:onEvent|7:onExcel|7:onError|
Script=#15:Option Explicit|0:|7:Dim FSO|0:|27:Function doWork(Data,Index)|10: Dim strIn|19: strIn = CStr(Data)|53: Set FSO = CreateObject("Scripting.FileSystemObject")|8: Dim Ext|28: Ext = GetAnExtension(strIn)|28: If LCase(Ext) <> "xls" Then|19: Sys.onEvent strIn|5: Else|8: Dim XL|44: Set XL = CreateObject("Excel.Application")|25: XL.WorkBooks.Open strIn|12: Dim strOut|13: strOut = ""|10: Dim rows|10: rows = 1|10: Dim colm|10: colm = 1|47: Do While Not IsEmpty(XL.Cells(rows, 1).Value)|51: Do While Not IsEmpty(XL.Cells(rows, colm).Value)|54: strOut = strOut & XL.Cells(rows, colm).Value & ";"|19: colm = colm + 1|7: Loop|27: strOut = strOut & vbCrLf|11: colm = 1|18: rows = rows + 1|6: Loop|9: XL.Quit|18: Set XL = Nothing|20: Sys.onExcel strOut|7: End If|12:End Function|0:|33:Function GetAnExtension(FileSpec)|23: On Error Resume Next|50: GetAnExtension = FSO.GetExtensionName(FileSpec)|100: If CStr(Err.Number) <> 0 Then call LogMsg(EventError, "Can't get extension of file: " & FileSpec)|12:End Function|0:|27:Sub LogMsg(intType, strMsg)|37: Sys.onError strMsg & ";" & intType|7:End Sub|
link(onExcel,2115300:doText,[(310,195)(310,55)])
}
Add(StrList,2115300,336,28)
{
Point(doSort)
}
Add(Hub,11221787,140,126)
{
OutCount=5
link(onEvent1,2115300:doClear,[(189,132)(189,41)])
link(onEvent3,7134762:doWork,[(191,146)(191,188)])
link(onEvent4,2115300:doSort,[(254,153)(254,76)])
}
Add(Button,1385885,28,126)
{
Left=20
Top=5
Caption="Open"
link(onClick,16073511:doExecute,[])
}
Add(StringTableMT,4591889,588,371)
{
Left=25
Top=40
Width=805
Height=295
Columns=#1:1|1:2|1:3|1:4|1:5|1:6|1:7|1:8|1:9|2:10|2:11|
Grid=0
ColorItems=0
IconsCheck=[]
MiscIcons=[]
Icons=[]
Point(doTextColor)
link(Str,4253483:FString,[(594,359)(531,359)(531,436)(468,436)])
}
Add(FormatStr,4253483,462,392)
{
Mask="%1;%2"
Point(FString)
link(onFString,4591889:doAdd,[(541,398)(541,377)])
link(Str1,8582034:Result,[(468,380)(426,380)(426,436)(384,436)])
link(Str2,4051247:Item,[])
}
Add(MathParse,8582034,378,392)
{
MathStr="%1 + %2+1"
link(onResult,4253483:doString,[])
link(X2,8428275:Selected,[])
}
Add(RadioButton,8428275,385,273)
{
Left=85
Top=5
Width=80
Caption="
карма: 0

0