473,549 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to import a spreadsheet with "junk" in numeric fields?

I need to import a spreadsheet into an Access table. The spreadsheet has
performance for mutual funds for various periods. The problem is that if
there is no info for a particular period, the spreadsheet contains a dash in
the cell (for example if the fun is only 4 years old and I look in the
columns for 5-year and 10-year performance).

I cannot change the dashes to blank with a global change, the negative
numbers would lose the negative sign. I know there is an acExportDelim
specification that I can fool around with, but I am not sure that is the
best way to go. Currently, I sort the columns until for each column the
dashes are at the bottom and delete them. I do this one col at a time for
quite a few columns and it is a pain. Any ideas?

Thanks
Here is an example of what I am talking about:

Fund name: 1-year 3-years 5-years 10-years
XYZ Fund 20.42 -2.75 - -


Nov 13 '05 #1
5 1915
Colleyville Alan wrote:
I need to import a spreadsheet into an Access table. The spreadsheet has
performance for mutual funds for various periods. The problem is that if
there is no info for a particular period, the spreadsheet contains a dash in
the cell (for example if the fun is only 4 years old and I look in the
columns for 5-year and 10-year performance).

I cannot change the dashes to blank with a global change, the negative
numbers would lose the negative sign. I know there is an acExportDelim
specification that I can fool around with, but I am not sure that is the
best way to go. Currently, I sort the columns until for each column the
dashes are at the bottom and delete them. I do this one col at a time for
quite a few columns and it is a pain. Any ideas?

Thanks
Here is an example of what I am talking about:

Fund name: 1-year 3-years 5-years 10-years
XYZ Fund 20.42 -2.75 - -


Maybe you can link the spreadsheet in access and write an append query
and use and expression to update the column of concern.

Nov 13 '05 #2
The technique I've arrived at for this kind of thing (exactly this kind of
thing, it sounds like <g>) is to insert a row of cells right under the column
headers, and fill each cell with ~~~. Now, when Access imports the data, it
will import all columns as text, and not try to guess the data types.

After importing, delete the row of ~~~, then use Update queries to fix known
types of data issues that will impede conversion. Finally, Insert that data
into another table with the correct target column types.

On Sat, 29 May 2004 14:37:22 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:
I need to import a spreadsheet into an Access table. The spreadsheet has
performance for mutual funds for various periods. The problem is that if
there is no info for a particular period, the spreadsheet contains a dash in
the cell (for example if the fun is only 4 years old and I look in the
columns for 5-year and 10-year performance).

I cannot change the dashes to blank with a global change, the negative
numbers would lose the negative sign. I know there is an acExportDelim
specificatio n that I can fool around with, but I am not sure that is the
best way to go. Currently, I sort the columns until for each column the
dashes are at the bottom and delete them. I do this one col at a time for
quite a few columns and it is a pain. Any ideas?

Thanks
Here is an example of what I am talking about:

Fund name: 1-year 3-years 5-years 10-years
XYZ Fund 20.42 -2.75 - -


Nov 13 '05 #3
Thanks. After I posted this, I tried fooling around with the
TransferSpreads heet command and it seems to update the fields correctly and
leave out the dashes, but I was not sure if that way had any disadvantages
and it is nice knowing there is another way to do this.

BTW, you wrote: "(exactly this kind of > thing, it sounds like <g>) " - do
you work with mutual fund performance info on a regular basis?
"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:o5******** *************** *********@4ax.c om...
The technique I've arrived at for this kind of thing (exactly this kind of
thing, it sounds like <g>) is to insert a row of cells right under the column headers, and fill each cell with ~~~. Now, when Access imports the data, it will import all columns as text, and not try to guess the data types.

After importing, delete the row of ~~~, then use Update queries to fix known types of data issues that will impede conversion. Finally, Insert that data into another table with the correct target column types.

On Sat, 29 May 2004 14:37:22 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:
I need to import a spreadsheet into an Access table. The spreadsheet has
performance for mutual funds for various periods. The problem is that if
there is no info for a particular period, the spreadsheet contains a dash inthe cell (for example if the fun is only 4 years old and I look in the
columns for 5-year and 10-year performance).

I cannot change the dashes to blank with a global change, the negative
numbers would lose the negative sign. I know there is an acExportDelim
specificatio n that I can fool around with, but I am not sure that is the
best way to go. Currently, I sort the columns until for each column the
dashes are at the bottom and delete them. I do this one col at a time forquite a few columns and it is a pain. Any ideas?

Thanks
Here is an example of what I am talking about:

Fund name: 1-year 3-years 5-years 10-years
XYZ Fund 20.42 -2.75 - -

Nov 13 '05 #4
One of my clients does. I've written the code to import fund performance data
exported in Excel format into a database, and normalize the data.

On Sun, 30 May 2004 01:06:54 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:
Thanks. After I posted this, I tried fooling around with the
TransferSpread sheet command and it seems to update the fields correctly and
leave out the dashes, but I was not sure if that way had any disadvantages
and it is nice knowing there is another way to do this.

BTW, you wrote: "(exactly this kind of > thing, it sounds like <g>) " - do
you work with mutual fund performance info on a regular basis?
"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:o5******* *************** **********@4ax. com...
The technique I've arrived at for this kind of thing (exactly this kind of
thing, it sounds like <g>) is to insert a row of cells right under the

column
headers, and fill each cell with ~~~. Now, when Access imports the data,

it
will import all columns as text, and not try to guess the data types.

After importing, delete the row of ~~~, then use Update queries to fix

known
types of data issues that will impede conversion. Finally, Insert that

data
into another table with the correct target column types.

On Sat, 29 May 2004 14:37:22 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:
>I need to import a spreadsheet into an Access table. The spreadsheet has
>performance for mutual funds for various periods. The problem is that if
>there is no info for a particular period, the spreadsheet contains a dashin >the cell (for example if the fun is only 4 years old and I look in the
>columns for 5-year and 10-year performance).
>
>I cannot change the dashes to blank with a global change, the negative
>numbers would lose the negative sign. I know there is an acExportDelim
>specificatio n that I can fool around with, but I am not sure that is the
>best way to go. Currently, I sort the columns until for each column the
>dashes are at the bottom and delete them. I do this one col at a timefor >quite a few columns and it is a pain. Any ideas?
>
>Thanks
>
>
>Here is an example of what I am talking about:
>
>Fund name: 1-year 3-years 5-years 10-years
>XYZ Fund 20.42 -2.75 - -
>
>
>


Nov 13 '05 #5
I've loaded Excel-based fund perf data into an Access database, matched it
against client holdings, wrote it out to formatted reports for the client
and created a presentation in PPT with the results. There's a lot of
spaghetti code, inefficiencies, and redundancies, but a 20-minute process
now takes less than 10 seconds. But it took 500 hours for a part-time VBA
hack like me to figure out how to do it! Many thanks to this forum for
solving some thorny problems.
"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:3d******** *************** *********@4ax.c om...
One of my clients does. I've written the code to import fund performance data exported in Excel format into a database, and normalize the data.

On Sun, 30 May 2004 01:06:54 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:
Thanks. After I posted this, I tried fooling around with the
TransferSpread sheet command and it seems to update the fields correctly andleave out the dashes, but I was not sure if that way had any disadvantagesand it is nice knowing there is another way to do this.

BTW, you wrote: "(exactly this kind of > thing, it sounds like <g>) " - doyou work with mutual fund performance info on a regular basis?
"Steve Jorgensen" <no****@nospam. nospam> wrote in message
news:o5******* *************** **********@4ax. com...
The technique I've arrived at for this kind of thing (exactly this kind of thing, it sounds like <g>) is to insert a row of cells right under the

column
headers, and fill each cell with ~~~. Now, when Access imports the data,
it
will import all columns as text, and not try to guess the data types.

After importing, delete the row of ~~~, then use Update queries to fix

known
types of data issues that will impede conversion. Finally, Insert that

data
into another table with the correct target column types.

On Sat, 29 May 2004 14:37:22 GMT, "Colleyvill e Alan"
<ae***********@ nospam.comcast. net> wrote:

>I need to import a spreadsheet into an Access table. The spreadsheet
has >performance for mutual funds for various periods. The problem is that if >there is no info for a particular period, the spreadsheet contains a dashin
>the cell (for example if the fun is only 4 years old and I look in the
>columns for 5-year and 10-year performance).
>
>I cannot change the dashes to blank with a global change, the negative
>numbers would lose the negative sign. I know there is an

acExportDelim >specificatio n that I can fool around with, but I am not sure that is the >best way to go. Currently, I sort the columns until for each column the >dashes are at the bottom and delete them. I do this one col at a time

for
>quite a few columns and it is a pain. Any ideas?
>
>Thanks
>
>
>Here is an example of what I am talking about:
>
>Fund name: 1-year 3-years 5-years 10-years
>XYZ Fund 20.42 -2.75 - -
>
>
>

Nov 13 '05 #6

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

Similar topics

0
1526
by: shuhsien | last post by:
Hi, I am confused by the junk parameter in the difflib.sequencematcher. I thought it would simply ignore everything that's returned true by the junk function. However, I have results as follows: >>> sequencematcher(lambda x: x == ' ', "lion", "li on").ratio() 0.88888888888888884 >>> sequencematcher("lion", "li on").ratio() 0.0
19
2444
by: Peter A. Schott | last post by:
I've got a file that seems to come across more like a dictionary from what I can tell. Something like the following format: ###,1,val_1,2,val_2,3,val_3,5,val_5,10,val_10 ###,1,val_1,2,val_2,3,val_3,5,val_5,11,val_11,25,val_25,967,val_967 In other words, different layouts (defined mostly by what is in val_1, val_2, val_3). The ,#,...
2
3811
by: wen | last post by:
and, in which case, the following case will happen: if __name__!='__main__': do_sth() any help would be appreciated.
1
1582
by: jmev7 | last post by:
Greetings Data Gurus! I've been asked to help find and delete junk records from a database table that comes from online data request forms: you know, those annoying forms you have to fill out to get a free download. Some visitors to the particular website fill out the required form just to get the free download. Many of them enter garbage...
2
3589
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records that are "dirty" i.e. the field contents do not comply with the expected format (date/time) and they end up in a seperate table of import errors....
40
5665
by: aku | last post by:
I'm looking for the absolute fastest way to count the nr of bits that are set to "1" in a string. Presumably I then first need the fastest way to do this in a byte. I think this is it, but welcome any improvements: i = 0; if (g && 1) i++; if (g && 2) i++;
40
7832
by: Dave Hansen | last post by:
Please note crosspost. Often when writing code requiring function pointers, it is necessary to write functions that ignore their formal parameters. For example, a state machine function might take a status input, but a certain error-handling state might ignore it: typedef void (*State_Fn)(uint8_t); void error_state(uint8_t status)
8
2571
by: Ian Davies | last post by:
Hello I have the following sql string to run as a command in my VB6 project to update mysql table strSQL = "LOAD DATA INFILE " & ImportFile & " INTO TABLE tPupils FIELDS TERMINATED BY ',' ENCLOSED BY ' " ' LINES TERMINATED BY '\n';" Problem is the double quote at position ......" ' LINES...... causes the command to fail thinking the...
1
3046
by: =?Utf-8?B?VGFsYWxTYWxlZW0=?= | last post by:
i have facility in my website which sends an e-mail to the cleint's inbox..... i am getting a problem when ever i sends an e-mail.. i tried with Hotmail and Yahoo, e-mail goes to the "Junk Mail" folder not the actual inbox.... how i can get e-mail sent the clients inbox not in their "Bulk" or "Junk Mail" box thanks my send e-mail page...
0
7527
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7726
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7967
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7485
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5377
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5097
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.