By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Reading in TRUE/FALSE from Excel SS to Access

100+
P: 294
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.

Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,492
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

100+
P: 294
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
Expert Mod 15k+
P: 31,492
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

100+
P: 294
Thanks for the explanation, NeoPa!
Nov 11 '13 #5

Post your reply

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