473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

invalid field names when importing from excell

I need to import a spreadsheet but the spread sheet has blank collums and
the first row contains abbreviations (e.g. DEPT. - with period). the
transferspreadsheet gives me field names "noname1", "noname2" etc and DEPT#.
How can I omit the blank field names and change the DEPT# to DEPT ??

thanks !
Jul 5 '06 #1
2 4366

675i76 wrote:
I need to import a spreadsheet but the spread sheet has blank collums and
the first row contains abbreviations (e.g. DEPT. - with period). the
transferspreadsheet gives me field names "noname1", "noname2" etc and DEPT#.
How can I omit the blank field names and change the DEPT# to DEPT ??

thanks !
Blank columns.... create an import spec and have it skip the blank
columns.
Map the columns to the proper fields in your spec and you're done.

something like this. Just alias the illegal names with legal ones.

SELECT xlsHrsWorked.[Dept#] AS Dept, xlsHrsWorked.[Hrs# Worked] AS
Hrs_Worked, xlsHrsWorked.[Emp# Name] AS Emp_Name INTO tblHoursWorked
FROM xlsHrsWorked;

Jul 5 '06 #2
If you are only do this once or twice then the easiest way is to open the
spreadsheet in Excel and save it under a new temporary name.

Then open the new spreadsheet and edit it making any changes like deleting
blank columns, change the column headers to remove any illegal characters,
spaces, peculiar punctuation symbols (like #, $, *, etc.etc.)

Finally import this spread sheet.
<pi********@hotmail.comwrote in message
news:11*********************@j8g2000cwa.googlegrou ps.com...
>
675i76 wrote:
I need to import a spreadsheet but the spread sheet has blank collums
and
the first row contains abbreviations (e.g. DEPT. - with period). the
transferspreadsheet gives me field names "noname1", "noname2" etc and
DEPT#.
How can I omit the blank field names and change the DEPT# to DEPT ??

thanks !

Blank columns.... create an import spec and have it skip the blank
columns.
Map the columns to the proper fields in your spec and you're done.

something like this. Just alias the illegal names with legal ones.

SELECT xlsHrsWorked.[Dept#] AS Dept, xlsHrsWorked.[Hrs# Worked] AS
Hrs_Worked, xlsHrsWorked.[Emp# Name] AS Emp_Name INTO tblHoursWorked
FROM xlsHrsWorked;

Jul 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SQLJunkie | last post by:
I am struggling on this issue and was hoping if anyone out there can help me. Here is the setup: I have a table with the following data: TableName: TranDetail MerchID ItemName Price...
1
by: Don Leverton | last post by:
Hi Folks, I have been given a CD with approx 130 .xls files (bean-counters!) that I would like to import and merge to ONE table (tblTradeshow). The XL files are *similarly*, but not...
2
by: Ralph | last post by:
I'm trying to import a range of cells from an Excel spreadsheet into a table in access. The first row contains column labels, but I cannot use those as my field names, both because of their format...
3
by: bmoos1 | last post by:
I have some information about a particular company that I need to access when I'm in a form. In the table the data won't import from excel because it's too large (over 255). I would really like...
5
by: EiEiO | last post by:
Hi All, I am trying to create an Import Form to "Map Fields" for importing many different tables into 1. The form I created has 2 columns of comboboxes ( A - AA) thru (J - JJ). The...
1
by: Phoenix_ver10 | last post by:
I have a mailing list with multiple names going to the same addresses. I need one address with all the names for that address on it. I checked out the example on microsoft's site, but A: It doesn't...
2
by: 675i76 | last post by:
I need to automate a process which imports a new excell spreadsheet every day. The spreadsheet has blank columns so access ( macro -transfer spreadsheet) assigns fieldnames "noname1", "noname2"...
4
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for...
1
by: shenkel55 | last post by:
I am using Access 2003. I've been importing Excel 2003 spreadsheets using the wizard in Access for some time now. The spreadsheet does NOT have the column names in the 1st row, so the wizard names...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.