CALC convert text to numbers

Hello,

I can only speak for myself, but numbers get formatted as text in two ways:

1. Import of a tab delimited or csv file.

2. Spreadsheets sent to me from other users who have imported such files.

Usually I format the import to avoid the problem, but if I just double click a csv file, it opens with the numbers formatted as text. Visually this is not a problem. But if I then decide I need to edit the sheet I either have to reimport it or reformat the numbers.

Hope this explains how it happens to me.

Charles

Thanks, Paul. That was helpful.

Charles

I'm with Charles on this one. I was the OP on the problem.

Nearly all of my issues are because I have my LO spreadsheet and then a CSV file. If I open the CSV file in LO it looks fine. I can't just import it into my existing spreadsheet because the data in it need to go into small subsets of my big spreadsheet. So I typically copy and paste groups of cells as required.

What I am used to doing in Excel is copy everything in, then format the cells to be numbers and they are converted to numbers and my formula work.

Or if I know they are text (but there is ABSOLUTELY NO WAY TO SEE THAT IN LO) I can do a paste special and that also works in excel and prevents the additional step of formatting the cells back to numbers.

All the discussions about the leading apostrophe are great but I still can't see it in LO nor can I remove it.

Yes, I got around the problem this time by creating a dummy column as described many messages ago, but the fact remains that it is neither easy to change nor easy to see when numbers are formatted as text in LO and coming from MsOffice this causes lots of problems.

Hello,

I can only speak for myself, but numbers get formatted as text in two ways:

1. Import of a tab delimited or csv file.

2. Spreadsheets sent to me from other users who have imported such files.

Usually I format the import to avoid the problem, but if I just double click a csv file, it opens with the numbers formatted as text. Visually this is not a problem. But if I then decide I need to edit the sheet I either have to reimport it or reformat the numbers.

Hope this explains how it happens to me.

Charles

Sent from my iPod Touch

I've been following this debate with great interest.

One big question comes to mind: Why would someone use the apostrophe construct in the first place if he intended to perform arithmetic calculations using the cell content? I understand ending up with a text string rather than a number by forgetting to use VALUE() on a substring in a formula but even that seems to fall into the category of a "cockpit error" rather than an "aircraft design flaw" as is being implied on one side of this debate.

--
Jim

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Eugenie (Oogie) McGuire
Desert Weyr http://www.desertweyr.com/
Paonia, CO USA

Hi.
I have sort of been following this in the background. Is this a recent issue in LO. I frequently open csv files with numbers and copy and paste into other sheets and the numbers work in formulae.

Steve

What I am used to doing in Excel is copy everything in, then format
the cells to be numbers and they are converted to numbers and my
formula work.

Really? I'm surprised. I didn't know Excel did this conversion just on
formatting. In LO you can use "Text to Columns" instead, surely?

Or if I know they are text (but there is ABSOLUTELY NO WAY TO SEE
THAT IN LO)

How would you see it in Excel? I recall the display in Excel being the
same as in LO. The only difference between digits that are text and
digits that are numbers is in the justification.

All the discussions about the leading apostrophe are great but I
still can't see it in LO nor can I remove it.

Cell by cell you can remove it, which is just the same as I remember
Excel working. You can see it, and remove it, in the input line per
cell. You can't see it in the actual cells, but you can't in Excel
either, as I recall.

Yes, I got around the problem this time by creating a dummy column as
described many messages ago, but the fact remains that it is neither
easy to change nor easy to see when numbers are formatted as text in
LO and coming from MsOffice this causes lots of problems.

Again, I'm puzzled by the implication that it is easier to see in
Excel. I recall it being the same in Excel as in LO, you see it from
the justification, unless that has been altered for the cells in
question.

As for changing it, it's pretty easy with the "Text to Columns"
functionality; I really can't think of a more straightforward way.
You're right that the paste and multiply trick doesn't work, but that
still has to be done as an extra step doesn't it? You first paste the
contents of the old sheet into the new sheet, then create a dummy cell
holding a single 1, then copy this and paste it over the new cells,
setting it to multiply. Surely this takes just as long, if not longer,
than the "Text to COlumns" method?

I agree the paste and multiply trick should work, but I'm just trying
to understand why you say LO is harder to change the data type, and
especially why you say it is harder to see the data type.

Paul

Or if I know they are text (but there is ABSOLUTELY NO WAY TO SEE THAT IN LO) ...

Er, this is easy, in fact (and shouting doesn't change that!). Providing that you have not imposed any alignment or justification choice on your cells, text will be left-aligned and numbers (etc.) right-aligned. In any case, just go to View | Value Highlighting (or Ctrl+F8). Text values will show in black and numbers (and related quantities, e.g. currency and dates) in blue. These colours show despite existing text colour choices or formatting choices such as negative currency values. You can use this temporarily whilst you are massaging your values and return to normal view afterwards.

All the discussions about the leading apostrophe are great but I still can't see it in LO nor can I remove it.

'Cause it's not there! (It appears only in the Input Line.)

Yes, I got around the problem this time by creating a dummy column as described many messages ago, ...

That was probably my suggestion, but someone else's Data | Text to Columns... technique is easier and therefore better.

... but the fact remains that it is neither easy to change nor easy to see when numbers are formatted as text in LO ...

Hmm!

Brian Barker

Hi,

What I am used to doing in Excel is copy everything in, then
format the cells to be numbers and they are converted to
numbers and my formula work.

Really? I'm surprised. I didn't know Excel did this conversion
just on formatting.

I just tried in Excel 2013 and it´s simply not true. :wink:

Changing the number format of a cell does not convert a text value
into a number value.

Stefan

No it does NOT appear on the input line on my machine. I can't attach a screen shot to this message but I can send one to you if that would help.

'Cause it's not there! (It appears only in the Input Line.)

Eugenie (Oogie) McGuire
Desert Weyr http://www.desertweyr.com/
Paonia, CO USA

Hi :slight_smile:
MS Office 2013 is different from 2010 is different from 2007 is
radically different from 2003. Formats change and sometimes cause
problems. The layout of the ribbon-bar changes. The macro language
changes quite a lot. What might have happened in one version
sometimes vanishes from the next but may reappear in another.

There is no-where that users can go to suggest changes or reversions.
Regards from
Tom :slight_smile:

My Excel was from 2000. It worked there, I have never upgraded it past that version.

I just tried in Excel 2013 and it´s simply not true. :wink:

Changing the number format of a cell does not convert a text value
into a number value.

Eugenie (Oogie) McGuire
Desert Weyr http://www.desertweyr.com/
Paonia, CO USA

Yes and no,

Yes everything changes from version to version in Microsoft Office. As I mentioned in another message the version I have is from 2000.

No in that you can submit feedback and changes to MS Office, and in fact from rev 1 (I was an Office User from the very beginning) to the last version I used (2000) I did that a lot and in fact many of the suggestions did find their way into the later versions.

Given my own experience with OpenOffice and now Libre Office it's no easier to suggest changes here than it was for Microsoft Office. They may get listened to a bit more in LO, no guarantee though.

Hi :slight_smile:
MS Office 2013 is different from 2010 is different from 2007 is
radically different from 2003. Formats change and sometimes cause
problems. The layout of the ribbon-bar changes. The macro language
changes quite a lot. What might have happened in one version
sometimes vanishes from the next but may reappear in another.

There is no-where that users can go to suggest changes or reversions.
Regards from
Tom :slight_smile:

Eugenie (Oogie) McGuire
Desert Weyr http://www.desertweyr.com/
Paonia, CO USA

Hi :slight_smile:
Where do you post to? I've never known anyone else say that MS Office
changed direction on anything in order to accommodate a user's
suggestion so this is a bit of a first. Usually users are just told
they can't be having the problem or get told to upgrade.

MS don't claim to listen to individual users so on the odd occasion
they do seem to have listened they get applauded for it. They
couldn't hope to be as responsive as LO. LO is held to a much higher
standard in terms of responsiveness.
Regards from
Tom :slight_smile:

>> Or if I know they are text (but there is ABSOLUTELY NO WAY TO SEE
>> THAT IN LO)
> How would you see it in Excel? I recall the display in Excel being
> the same as in LO. The only difference between digits that are text
> and digits that are numbers is in the justification.
In Excel you can look at the formatting and if the formatting is as
text you can change it and the numbers are now considered numbers not
text. You do have to look at the cell format but once you do it's
obvious as either text or numbers.

Well in LO you can't change the data type just by changing the
formatting, but you should be able to see it! If you go to the format
of a cell, and the format is text, then the values in the cell are
text, but if the format is number, then the values are either numbers,
or text, in which case they will be preceeded by an apostrophe in the
input line. Although you say this isn't the case for you, this is how
it *should* work.

>> All the discussions about the leading apostrophe are great but I
>> still can't see it in LO nor can I remove it.
> Cell by cell you can remove it, which is just the same as I remember
> Excel working. You can see it, and remove it, in the input line per
> cell. You can't see it in the actual cells, but you can't in Excel
> either, as I recall.
Actually you can't see it in LO at all, in the input line or
anywhere. At least not on my machine, a mac. I've just re-verified
this for the umptenth time. I'm attaching a bit of a screen grab that
shows the input line in LO of a file where the cell I am looking at
is actually text. No apostrophe showing at all, no obvious way to
tell the thing is actually text and no way to change it easily.

As far as I can see from your screengrab, the number is left-aligned,
meaning it is text. In that case it won't show an apostrophe, because
the value is text in a cell formatted as text. It only shows an
apostrophe if the value is text in a cell formatted as a number,
because there is no need to mark text as text if it is in a cell
formatted as text. This is (as I recall from some years ago) the same
as Excel, I think.

I wasn't able to get the text to columns to work on my spreadsheets
so gave up on it. I haven't tried it again to see if it works. I'm
also trying to get the extension mentioned a while back installed and
running too.

I haven't used that extension personaly, so I can't talk about that, but
the "Text to Columns" really should work. For me, I just select some
cells that have values that are text, but I want as numbers, then I
select "Text to Columns" from the "Data" menu, and click "Ok" in the
dialog that pops up. No need to do anything more.

Note that the selected cells have to be in a continuous range in a
single column. Also, for reference, my dialog settings are as follows:

Separator options:
  Separated by:
    Tab
    Comma
    Text delimiter: "

Nothing else selected.

I really hope this works for you. If not, let us know what is going
wrong, and we'll see if we can't get it working.

Perhaps seeing the screen grab will explain, there is no feedback to
the user at all on the data type in LO.

You mean apart from the justification?
Are you sure the apostrophe is not showing when you have a text data
value in a cell formatted as a number?
And apart from these two indicators, what other indicators does Excel
have (other than the fact that if you examine the format (in your
version) it tells you what the data type is)?

The source for most of my files that I have to add is from an SQLite
Database. The fields that are in the table are defined to be of type
either real or integer (depends on the characteristic I am looking
at) in SQLite. Once I get the proper query done in the database I
save the results as a .CSV file, move the file from the machine that
is doing the field sheep evaluations to my main desktop mac where I
have my main spreadsheep. I bring up the .CSV file and the main sheep
spreadsheet file up at the same time and cut and paste as required. I
can't replace whole columns, my subset from the database often does
not include data for all sheep but only for those individuals who got
evaluated that particular day. My spreadsheet file has one row per
sheep and then hundreds of data points for that specific animal in
the columns. Since often groups of sheep get the same thing done on
the same date I may have many individuals with data related to a
specific item like a vaccine or a wormer.

If you can do "Text to Columns" on the .csv file before copying the
data over, it would save you a lot of trouble, I think. We really need
to get that working for you.

In any case, just go to View | Value
Highlighting (or Ctrl+F8). Text values will show in black and
numbers (and related quantities, e.g. currency and dates) in
blue. These colours show despite existing text colour choices or
formatting choices such as negative currency values. You can use
this temporarily whilst you are massaging your values and return to
normal view afterwards.

Thanks Brian! I haven't seen this before, and it's really useful.

That's a nice solution.

The only way I have to know that the numbers are in reality text, are that they are originally left aligned. Numbers are right aligned.

In other matter, I get the ' when I apply a number format to a cell previously formatted as text. If I edit it (F2) I can reach the ' and edit it by hand. This is really slow and not practical.