Convert second row to header in table

KhanhQ83

New member
Local time
, 21:29
Joined
Sep 20, 2016
Messages
2
Hello everyone,

I'm a newbie here and hoping the experts can help me out. I have an excel that columns are not constant. The header is on the 10th row. I'm trying to figure out a way to import this file, make the 10th row as header and then I can extract the columns I need.

So far, I started with importing the excel file as is with headers in first row as false. Then I created a query to delete the top 9 rows. Now I'm left with the second row as my headers but the headers are defaulted to Field1, Field2, Field3, etc.... How can I move the second row into the header via a query?

Many thanks in advance

Sent from my Nexus 6P using Tapatalk
 
use the range parameter to set the range to start on the 10th line e.g.

docmd.transferspreadsheet aclink, acSpreadsheetTypeExcel12, "temptbl", filename, True, "10:100"
 
use the range parameter to set the range to start on the 10th line e.g.

docmd.transferspreadsheet aclink, acSpreadsheetTypeExcel12, "temptbl", filename, True, "10:100"

This worked perfectly! Thanks alot
 

Users who are viewing this thread

Back
Top Bottom