Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excell books merg
Message
From
08/11/2005 09:03:07
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01065904
Message ID:
01066410
Views:
17
hi,
this is a message,
(there is alarge amount of information on clipboard. do you want to be able to paste this information into another program later.

also SaveAs(lcNewXlsName) not found

thanks
>What error message? Where?
>
>>i try as under , i think rong position
>>i see the same error message
>>
>>oExcel = CREATEOBJECT("Excel.Application")
>>DIMENSION MyExcelFiles[5]
>>
>>MyExcelFiles[1] = "e:\a.XLS"
>>MyExcelFiles[2] = "e:\b.XLS"
>>MyExcelFiles[3] = "e:\C.XLS"
>>MyExcelFiles[4] = "e:\d.XLS"
>>MyExcelFiles[5] = "e:\e.XLS"
>>
>>oExcel.WorkBooks.Open(MyExcelFiles[1])
>>oActive = oExcel.ActiveWorkbook.Name
>>*oExcel.ActiveWorkbook.SaveAs(lcNewXlsName)&&&
>>
>>FOR nXLS = 2 TO 5
>>    ** Because COPY TO XL produce only one sheet we must insert a new one here
>>    oExcel.ActiveWorkbook.Sheets.Add()
>>    oExcel.WorkBooks.Open(MyExcelFiles[nXLS])
>>    cNewBook = oExcel.ActiveWorkbook.Name
>>    oExcel.ActiveWorkbook.ActiveSheet.Cells.Select()
>>    oExcel.Selection.Copy()
>>    oExcel.Windows(oActive).Activate
>>    oExcel.ActiveWorkbook.ActiveSheet.Paste()
>>    oExcel.Windows(cNewBook).Activate
>>    oExcel.ActiveWorkbook.Close()
>>    oExcel.Windows(oActive).Activate
>>NEXT
>>*oExcel.ActiveWorkbook.Save()
>>oExcel.ActiveWorkbook.SaveAs(lcNewXlsName)&&&&
>>
>>oExcel.Quit()
>>oExcel = NULL
>>RELEASE oExcel
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform