ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel (https://www.excelbanter.com/excel-programming/275155-excel.html)

Mah'd

Excel
 
Hi there

I am trying to insert data on the first column in a
sheet , this row named 'Name', i noticed somthing that the
cell after the header is empty and the inserted data
follow it , is there any way to eliminate this empty
cell , i am using ADO.net to insert data on the excel sheet

e.g
A b c
Name
[empty cell] - I want to eliminate this cell.
Data1
Data2
....
Datan


kiat

Excel
 
To delete cell: Range("A2").delete
To delete row: Rows(2).delete

"Mah'd" wrote in message
...
Hi there

I am trying to insert data on the first column in a
sheet , this row named 'Name', i noticed somthing that the
cell after the header is empty and the inserted data
follow it , is there any way to eliminate this empty
cell , i am using ADO.net to insert data on the excel sheet

e.g
A b c
Name
[empty cell] - I want to eliminate this cell.
Data1
Data2
...
Datan




onedaywhen

Excel
 
As you probably already know, INSERT INTO places the new row at the
bottom of the range and you can't use DELECT at all with Excel. How
about using UPDATE? E.g.

UPDATE [Sheet1$] SET Name='New Name' WHERE Name IS NULL

Best I can come up with, I'm afraid.

"Mah'd" wrote in message ...
Hi there

I am trying to insert data on the first column in a
sheet , this row named 'Name', i noticed somthing that the
cell after the header is empty and the inserted data
follow it , is there any way to eliminate this empty
cell , i am using ADO.net to insert data on the excel sheet

e.g
A b c
Name
[empty cell] - I want to eliminate this cell.
Data1
Data2
...
Datan



All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com