Don't call
xcelObject.Workbooks.Close
it will stay open. Keep global reference to xcelObject
There is also UsedRange
http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.usedrange(v=vs.80).aspx
On Thu, Jul 14, 2011 at 3:03 PM, Kiran Ogeti wrote:
> I am calling a functi
Kiran,
Gopi solution should be sufficient I believe but I still feels that
declaring the array in below code is not a good practice until we know the
exact number of items. I would suggest Kiran to gather the total number of
Data rows you need to add and then dynamically declare the array size equ
Hi,
pl try this, it may help u..
Note: pass your values as many in to this array
val=Array(23,11,21)
ad(val)
Function ad(val)
Set exl=createobject("excel.application")
exl.Workbooks.Open "C:\Documents and Settings\Gopi\Desktop\Book1.xls"
set sht=exl.ActiveWorkbook.Worksheets(1)
rw=sht.usedr
HI Kiran,
You can store the data in array and run in loop.
take ubound of array so you need not send data for every time
*
Regards,
Mohan*
oSheet
On Fri, Jul 15, 2011 at 12:33 AM, Kiran Ogeti wrote:
> I am calling a function to add data to excel sheet as below,.. basically
>