473,385 Members | 1,506 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,385 software developers and data experts.

Reading in TRUE/FALSE from Excel SS to Access

294 256MB
The title kind of speaks for itself. I have a field predetermined in Access that should be a Yes/No data type with True/False format. When I read it in, Access always cuts it off.

My solution is that I allowed access to create the table for me, however, it read the true/false in as a number (-1 = true, 0 = false).

Is there a way to read this data in without some kind of work-around? I've browsed but nothing has helped me thus far...


Thanks!
Nov 6 '13 #1

✓ answered by NeoPa

There is nothing to tell it that the data is Boolean other than the format. If it were to try to handle the data as formatted rather than as stored then there would be a lot of very confused users of the system.

Rather, it deals with the data it finds. Excel doesn't have any concept of Boolean data, so Access cannot interpret any data that way. It's not human to make guesses related to how the code is displayed, and if it were it would be highly unpredictable. How it works now is probably the most sensible approach given the current circumstances.

4 1542
NeoPa
32,556 Expert Mod 16PB
It may help you to know that True, in Access, is stored as a numeric value of -1, and that False is stored the same way as 0.

Thus, the data you're importing is perfectly correct. It is simply how it is formatted to display that makes it seem any different.

This explains why you haven't found solutions to this 'problem' anywhere on the web.
Nov 7 '13 #2
mcupito
294 256MB
Thanks for the reply, NeoPa. The part I am confused on is why doesn't Access read it in as True/False or Yes/No. It read it in as a Number data type when I let Access create the table. When I try to read in the data from Excel without allowing Access to create the table, it cuts out the "FALSE" tuples.
Nov 8 '13 #3
NeoPa
32,556 Expert Mod 16PB
There is nothing to tell it that the data is Boolean other than the format. If it were to try to handle the data as formatted rather than as stored then there would be a lot of very confused users of the system.

Rather, it deals with the data it finds. Excel doesn't have any concept of Boolean data, so Access cannot interpret any data that way. It's not human to make guesses related to how the code is displayed, and if it were it would be highly unpredictable. How it works now is probably the most sensible approach given the current circumstances.
Nov 9 '13 #4
mcupito
294 256MB
Thanks for the explanation, NeoPa!
Nov 11 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

35
by: Steven Bethard | last post by:
I have lists containing values that are all either True, False or None, e.g.: etc. For a given list: * If all values are None, the function should return None.
1
by: David Krmpotic | last post by:
hi!! I use the following code to operate excel document: Excel.Application excelApp = new Excel.ApplicationClass(); //excelApp.Visible = true; string workbookPath = "c:\\eltina.xls";...
1
by: lkrubner | last post by:
In the first version of this function, I only test for true or false, on a global var, without limiting that true or false to the id of a particular item. What this meant was that if you were using...
14
by: Walter Dnes (delete the 'z' to get my real address | last post by:
I took a C course some time ago, but I'm only now beginning to use it, for a personal pet project. My current stumbling-block is finding an efficient way to find a match between the beginning of a...
59
by: Pierre Quentel | last post by:
Hi all, In some program I was testing if a variable was a boolean, with this test : if v in My script didn't work in some cases and I eventually found that for v = 0 the test returned True ...
71
by: David T. Ashley | last post by:
Where is the best place to define TRUE and FALSE? Are they in any of the standard include files, ever? Do any standards apply? What I've traditionally done is something like: #ifndef...
40
by: nufuhsus | last post by:
Hello all, First let me appologise if this has been answered but I could not find an acurate answer to this interesting problem. If the following is true: C:\Python25\rg.py>python Python...
1
by: =?Utf-8?B?U2hlZXMgQWJpZGk=?= | last post by:
I read an article on the link: http://support.microsoft.com/default.aspx?scid=kb;en-us;306572 related to reading data from Excel using OLEDB The topic's heading is: How to query and display excel...
1
by: joecosmides | last post by:
I have a microsoft access front end and backend database for multi- user use. I have the back end located on a server that also is an IIS webserver. I've created a few ASP pages that pull customer...
2
by: joecosmides | last post by:
I have a microsoft access front end and backend database for multi- user use. I have the back end located on a server that also is an IIS webserver. I've created a few ASP pages that pull customer...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.