Sersey писал(а):
А как на точку doSheet предать имя листа для открытия?Add(Label,15711866,154,133)
{
Width=610
Height=35
Align=2
Caption=""
AutoSize=1
}
Add(MainForm,4378171,280,133)
{
Width=626
Height=643
}
Add(Button,4982637,336,133)
{
Left=5
Top=5
Caption=" Open"
link(onClick,10622552:doExecute,[])
}
Add(ODialog,10622552,385,133)
{
link(onExecute,5432892:doWork,[])
}
Add(VBJScript,5432892,441,133)
{
@Hint=#16:Query SQL Server|
WorkPoints=#6:doWork|
EventPoints=#6:onRead|7:onClear|
DataPoints=#9:sheetName|
Script=#12:Dim objExcel|22:Sub doWork(Data,Index)|52: Set objExcel = CreateObject("Excel.Application")|52: Set objWorkbook = objExcel.Workbooks.Open (Data)|19: sys.onClear nil|4: |42: objExcel.Sheets(sys.sheetName).Cells.Copy|31: objExcel.DisplayAlerts = False|15: sys.onRead nil|14: objExcel.Quit|24: Set objExcel = Nothing |0:|7:End Sub|
UseName=0
link(onRead,8431210:doConvert,[])
link(sheetName,14887572:Text,[])
}
Add(Clipboard,14068702,504,84)
{
}
Add(MTStrTbl,911494,217,133)
{
Top=35
Width=610
Height=569
Align=5
Name="Tabl"
}
Add(MST_Load,16380463,560,126)
{
Delimiter="\t"
MSTControl="Tabl"
link(onLoadFromStream,13279101:doEvent1,[])
}
Add(DoData,6691139,693,133)
{
Data=String()
link(onEventData,14068702:doPutText,[(732,139)(732,76)(494,76)(494,90)])
}
Add(StreamConvertor,8431210,504,133)
{
Mode=7
Point(Data)
link(onResult,16380463:doLoadFromStream,[])
link(Data,14068702:Text,[])
}
Add(MST_ColAction,13742514,644,140)
{
Action=9
Index=-2
MSTControl="Tabl"
}
Add(Hub,13279101,609,133)
{
link(onEvent1,6691139:doData,[])
link(onEvent2,13742514:doColAction,[])
}
Add(Edit,14887572,441,77)
{
Left=75
Top=5
Width=75
Text="Лист1"
}