Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey eb
I am clearing the contents of one sheet using clearcontents(). Then transferring new data to that sheet using dts (data transformation task). Unfortunatly that data is positioned in the sheet, below the range i had cleared befor,instead of replacing the empty rows there. Any idea why?? TIA Rea |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activesheet.ClearContents
ActiveWorkbook.Save Excel will hold in memory where the data was before it was cleared so it can do things like Undo. To prove this, clear a sheet of data and then hit Ctrl+End. Now hit the Disk icon to save it and do Ctrl+End again. Mike F "Rea Peleg" wrote in message ... Hey eb I am clearing the contents of one sheet using clearcontents(). Then transferring new data to that sheet using dts (data transformation task). Unfortunatly that data is positioned in the sheet, below the range i had cleared befor,instead of replacing the empty rows there. Any idea why?? TIA Rea |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are right! but...
I think i am doing the same in my code. I clear the sheet, save it and quit the excel application all together: 'clear content of dataRange dataRange.Offset(2, 0).ClearContents xlWb.Save xlWb.Close xlApp.Quit Only then I continue to the next step in my dts package - where i do the new data insertion using data transformation task. From some reason that sheet behaves as if it was not yet saved after being cleared before.. Thanks alot Rea "Mike Fogleman" wrote: Activesheet.ClearContents ActiveWorkbook.Save Excel will hold in memory where the data was before it was cleared so it can do things like Undo. To prove this, clear a sheet of data and then hit Ctrl+End. Now hit the Disk icon to save it and do Ctrl+End again. Mike F "Rea Peleg" wrote in message ... Hey eb I am clearing the contents of one sheet using clearcontents(). Then transferring new data to that sheet using dts (data transformation task). Unfortunatly that data is positioned in the sheet, below the range i had cleared befor,instead of replacing the empty rows there. Any idea why?? TIA Rea |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
shouldn't
Dim x As Integer x = Activesheet.UsedRange.Rows.Count instead of ActiveWorkbook.Save do a reset also? Dm Unseen |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since you need to write excel code anyway, why do you push the data to
excel with DTS instead of pulling the data with Queries/QueryTable/PivotTable/ADO ? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Because it's easier..
Any way did it now with ado and vbscript and it works fine. "DM Unseen" wrote: Since you need to write excel code anyway, why do you push the data to excel with DTS instead of pulling the data with Queries/QueryTable/PivotTable/ADO ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Match Multiple Criteria and Return values positioned above the zero | Excel Worksheet Functions | |||
Password cleared in clean up | Excel Discussion (Misc queries) | |||
How do I clear the Field pulldowns after the data is cleared? | Excel Discussion (Misc queries) | |||
why the value in the column X is cleared | Excel Programming | |||
why the value in the column X is cleared | Excel Programming |