Can REV create Excel files?
Ken Ray
kray at sonsothunder.com
Sun Mar 4 21:45:57 EST 2007
On Sun, 4 Mar 2007 13:00:59 +0000, Liam Lambert wrote:
>>There are ways to direct the data to a specifically named worksheet (or
>>the active one), so if you're interested in that, let me know.
>
> Ken I have been watching this thread with great interest it has been
> a great help to
> me, it would be very useful to me to be able to direct the data to a
> specifically named worksheet
Well, basically you change the VBScript that says:
ObjXL.Range(<range>).Value
to either:
ObjXL.ActiveWorkbook.ActiveSheet.Range(<range>).Value
if you want the currently displayed worksheet in the currently
displayed workbook ("file"), or for a specific worksheet in a specific
workbook, you can do:
ObjXL.Workbooks.Item(<shortDocumentName>).Worksheets.Item(<sheetName>).Range(<range>).Value
So to get the data from cell B3 of the worksheet "Sheet3" of the
document "Financials.xls", you'd use:
ObjXL.Workbooks.Item("Financials.xls").Worksheets.Item("Sheet3").Range("B3").Value
HTH,
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list