Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Scientific Notation - I wish MS Gave us a switch to turn it off

Microsoft really needs a feature to turn off Scientific Notation. It's
causes us no end of aggravation and we give them a ton of businsess.

I'm importing a spreadsheet into Access 2003 from Excel 2003. There are
account numbers such as 0123456789 or 0123E456987 that undesirably convert to
scientific notation upon import. Users enter these values in Excel, so the
column is formatted as text (if it were General, the lead 0 would drop out.)
I then, using automation from Access running Excel macros, append an "x" to
the front of the cell values and convert the format to General, then use
TransferSpreadsheet to bring into Access. That's a hassel.

Is there an algorithm I can us in Access to convert scientific notation back
to text or will the fact some accounts start with a 0 create a problem?
We've had this issue for over a year withou satisfactory resolution.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Scientific Notation - I wish MS Gave us a switch to turn it off

Hi Perico,

I hope that I have read your question correctly.

This type of problem usually occurs because when Access imports an Excel
file, it reads the first few rows of the Excel worksheet and sets data types
for each column based on its own algorithm. Unfortunately Access can make
mistakes at times.

Here is a little trick I use to import worksheets into Access.

Set up the Excel worksheet with column headings, then three hidden lines,
then user data.
In the three hidden lines enter dummy data that is in the correct format for
each column. i.e. for your account numbers enter "xxxx" to force Access to
recognise this as a text column.

In Access, set up a link to the Excel worksheet.
Write a make table query that copies the linked Excel data to a new table.
Use a criteria in this query to exclude the dummy data in the worksheet.
e.g. in the above example WHERE [account number] < 'xxxx'.

Now you can just run the make table query each time you wish to import the
data.

Ed Ferrero

Microsoft really needs a feature to turn off Scientific Notation. It's
causes us no end of aggravation and we give them a ton of businsess.

I'm importing a spreadsheet into Access 2003 from Excel 2003. There are
account numbers such as 0123456789 or 0123E456987 that undesirably convert
to
scientific notation upon import. Users enter these values in Excel, so
the
column is formatted as text (if it were General, the lead 0 would drop
out.)
I then, using automation from Access running Excel macros, append an "x"
to
the front of the cell values and convert the format to General, then use
TransferSpreadsheet to bring into Access. That's a hassel.

Is there an algorithm I can us in Access to convert scientific notation
back
to text or will the fact some accounts start with a 0 create a problem?
We've had this issue for over a year withou satisfactory resolution.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Scientific Notation - I wish MS Gave us a switch to turn it of

Interesting, Ed. (I still wish MS made it easier.) I use the
transferspreadsheet method to pull the data into Access. Would your
technique work with that? What does you code look like setting up and
breaking the link?

"Ed Ferrero" wrote:

Hi Perico,

I hope that I have read your question correctly.

This type of problem usually occurs because when Access imports an Excel
file, it reads the first few rows of the Excel worksheet and sets data types
for each column based on its own algorithm. Unfortunately Access can make
mistakes at times.

Here is a little trick I use to import worksheets into Access.

Set up the Excel worksheet with column headings, then three hidden lines,
then user data.
In the three hidden lines enter dummy data that is in the correct format for
each column. i.e. for your account numbers enter "xxxx" to force Access to
recognise this as a text column.

In Access, set up a link to the Excel worksheet.
Write a make table query that copies the linked Excel data to a new table.
Use a criteria in this query to exclude the dummy data in the worksheet.
e.g. in the above example WHERE [account number] < 'xxxx'.

Now you can just run the make table query each time you wish to import the
data.

Ed Ferrero

Microsoft really needs a feature to turn off Scientific Notation. It's
causes us no end of aggravation and we give them a ton of businsess.

I'm importing a spreadsheet into Access 2003 from Excel 2003. There are
account numbers such as 0123456789 or 0123E456987 that undesirably convert
to
scientific notation upon import. Users enter these values in Excel, so
the
column is formatted as text (if it were General, the lead 0 would drop
out.)
I then, using automation from Access running Excel macros, append an "x"
to
the front of the cell values and convert the format to General, then use
TransferSpreadsheet to bring into Access. That's a hassel.

Is there an algorithm I can us in Access to convert scientific notation
back
to text or will the fact some accounts start with a 0 create a problem?
We've had this issue for over a year withou satisfactory resolution.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Scientific Notation - I wish MS Gave us a switch to turn it of

Hi Perico,

Interesting, Ed. (I still wish MS made it easier.) I use the
transferspreadsheet method to pull the data into Access. Would your
technique work with that? What does you code look like setting up and
breaking the link?


With my method there is no need to use code. I just leave the link in Access
and replace the Excel Workbook as necessary.

Yes, the method would work if you use the TransferSpreadsheet method

Code would be;


DoCmd.TransferSpreadsheet acImport, 8, "ExcelLink", "C:\myPath\myBook.xls",
True, ""
DoCmd.OpenQuery "qryDelDummy"

Where the query qryDelDummy is something like

DELETE *
FROM ExcelLink
WHERE ExcelLink.[account number] Like "xxxx*"

Hope this helps.

If you wish to continue this thread, perhaps the access newsgroup might be a
better place?

Ed Ferrero


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
turn off scientific notation slugger92 Excel Discussion (Misc queries) 3 February 21st 19 08:25 PM
Scientific notation Biocellguy Excel Worksheet Functions 2 May 24th 07 07:48 PM
how can I turn off scientific notation lfife Excel Discussion (Misc queries) 1 February 28th 07 04:04 PM
Turn Off Scientific Notation JeremyO Excel Programming 1 August 2nd 04 05:52 AM
Turn Off Scientific Notation Jabberwocky[_2_] Excel Programming 3 August 2nd 04 05:21 AM


All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"