MartyConnelly
martyconnelly at shaw.ca
Tue Aug 8 13:53:39 CDT 2006
Something like xl.Application.Worksheets("WorkSheetName").Range("A2:D10").Delete Are you trying to delete the header records with the column names?. Cause you can also open an Excel Spreadsheet using the JET OLE DB Provider to read into a Access table, removing the header record oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\somepath\mySpreadsheet.xls;" & _ "Extended Properties=""Excel 8.0;HDR=Yes""" Where "HDR=Yes" means that there is a header row in the cell range (or named range), so the provider will not include the first row of the selection into the recordset. If "HDR=No", then the provider will include the first row of the cell range (or named ranged) into the recordset. http://support.microsoft.com/default.aspx?scid=kb;en-us;278973 Gustav Brock wrote: >Hi David > >If you link or open the file as a table, you can't. >You have to use automation to open Excel and the file and then delete the row in an "Excel way". > >/gustav > > > >>>>dmcafee at pacbell.net 08-08-2006 19:56:03 >>> >>>> >>>> >Does anyone know how to delete the first row of an Excel file from within >access? > > >TIA, >David > > > -- Marty Connelly Victoria, B.C. Canada