[program-l] Re: Microsoft Access, VBA: Retaining date type field names when importing from Excel

  • From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Sat, 15 Apr 2006 07:35:59 +0530

Hi Dale,

You do not need to create a table to export to in Microsoft Access. When
importing an Excel sheet for instance, the sheet becomes the table.

Pranav

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Dale Leavens
Sent: Friday, April 14, 2006 8:51 AM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Microsoft Access, VBA: Retaining date type field
names when importing from Excel

I am pretty uncertain about this but it seems to me that you create a table 
with the fields you want then specify in Excel to export to that table, one 
row in Excel to one record in Access. I am pretty sure I read this in one of

the help files some time ago but don't remember where, Excel or more 
probably Access and a quick peek so far hasn't located it. I am curious 
about this now as well so will try to find it but don't hold your breath, a 
busy few days ahead.

.
----- Original Message ----- 
From: "Pranav Lal" <pranav.lal@xxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Thursday, April 13, 2006 10:49 PM
Subject: [program-l] Re: Microsoft Access, VBA: Retaining date type field 
names when importing from Excel


> Hi David,
>
> I will have the look into that since I have seen no reference for doing 
> this
> anywhere.
>
> Pranav
>
> -----Original Message-----
> From: program-l-bounce@xxxxxxxxxxxxx 
> [mailto:program-l-bounce@xxxxxxxxxxxxx]
> On Behalf Of David Lant
> Sent: Thursday, April 13, 2006 7:03 PM
> To: program-l@xxxxxxxxxxxxx
> Subject: [program-l] Re: Microsoft Access, VBA: Retaining date type field
> names when importing from Excel
>
> Hi Pranav,
>
> It's a while since I did much with Access.  But is it possible to create
> an import specification file for your Excel spreadsheet?  That way, you
> can tell Access how to format or name fields in the imported file.  I
> know you can do it with tab and comma delimited text files, but I'm not
> so sure about Excel.
>
> David Lant
>
> I.T. Consultant
> Consultancy & Development
> ICT Services
> Tel: (01392) 382464
>
> Disclaimer:
> http://www.devon.gov.uk/email.shtml
>
>
> -----Original Message-----
> From: program-l-bounce@xxxxxxxxxxxxx
> [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Pranav Lal
> Sent: 13 April 2006 11:38
> To: program-l@xxxxxxxxxxxxx
> Subject: [program-l] Microsoft Access, VBA: Retaining date type field
> names when importing from Excel
>
>
> Hi all,
>
> I have a time sheet in Microsoft Excel. The columns are
> employee name, project name, and dates;
> That is, there is a column corresponding to every date. Finally, there
> is a column that sums the hours worked on all the days. so, a sample
> sheet will look like
> name: project: 01-apr-2006: 02-apr-2006: totalHours
> Pranav Lal: testProject: 8: 6: 14
> Note:
> The ":" character without the quotes is the column separator in the
> above example.
>
> The cells of the  date columns have been formatted as date such that
> the moment the start date is changed, the rest of the dates change
> automatically. When I import the sheet into Microsoft access using the
> transferSpreadsheet function, the date type field names are lost. How
> do I retain these field names?
>
> One way seems to be to use automation and convert the dates to text
> and then import the sheet. How do I do this? Do I use the text
> function? Also, The number of date columns in the sheet are not
> standard since  every month has a different number of days. I suspect
> I will have to do some fiddeling with finding the last date column.
> This is not so difficult since  it will be one less than the last
> column in the sheet.
>
> Pranav
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>
> ** To leave the list, click on the immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
> ** If this link doesn't work then send a message to:
> ** program-l-request@xxxxxxxxxxxxx
> ** and in the Subject line type
> ** unsubscribe
> ** For other list commands such as vacation mode, click on the
> ** immediately-following link:-
> ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
> ** or send a message, to
> ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.1/310 - Release Date: 12/04/2006
>
> 

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: