You could do it before the import (via the Excel object model), or after the import (via DAO or ADO).
 
 
Dim objApp As Excel.Application
Dim objBook As Excel.Workbook
Dim objSheet As Excel.Worksheet
 
Set objApp = New Excel.Application
Set objBook = objApp.Workbooks.Open("C:\MyExcelFile.xls")
 


From: AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of George Oro
Sent: Monday, January 16, 2006 4:19 AM
To: YG Access Dev; YG Access
Subject: [AccessDevelopers] Change Excel Column Name

I want to import one excel file but before my code will execute, I want to change first the last two columns heading into PrevReading & NewReading.
 
The reason is, the excel file is extracted from a different software using a pre-defined template but the last two columns heading is the Previous Reading & New Reading Date with their respective data. Basically each export from the other software, the last two columns heading will change according to date reading so its not fixed at all.
 
The exported excel file is always composed of 10 columns and save in the same directory and file name.
 
Any tips would be greatly appreciated.
 
TIA
George
 
 
 



Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to