[Solved] Can I just mark the '-' sign without '0'?

Discuss the spreadsheet application
Post Reply
mirrDY
Posts: 3
Joined: Tue Jun 01, 2021 11:40 am

[Solved] Can I just mark the '-' sign without '0'?

Post by mirrDY »

Use the '-' symbol to omit data. In some cases, the data is actually zero, so we don't want to omit all of '0'. I just want the '-" symbol to come out as it is.

and Is there a way to open the csv file and open the file according to the existing settings so that the setup window does not appear?
Last edited by MrProgrammer on Tue Jun 15, 2021 8:35 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.10 on WIndows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Can I just mark the '-' sign without '0'?

Post by Villeroy »

You describe where you want to go without describing where you come from. There are thousands of different csv formats. Look a this one, for instance:

Code: Select all

31.05.2021;"XXXXXXX XXXX: XXXXXXXXXXXXXXXXXXXXXXXXXXX; XXXXX XXXXXXXX; XXXXXX XXX XXXX XXXXX XXXX XXXXXXXXXX XXX XXXXX- XXXXXXXX XXXXXXXXXXXX XXXXXXXXX";EUR;0,01;;1.113,63
It is semicolon separated since the numbers are written in German notation with comma as decimal separator, point as thousands separator (see last column) and with dates written as DD.MM.YYYY.
Open the file with a text editor, remove/replace confidential text and post it here.

----
Answer to the second question:
menu:Insert>Sheet From File
Check option "Link"
Specify the file and the import options.
Save as ODF spreadsheet (*.ods)
Close the spreadsheet, replace the text file and open again. Answer the update question with "Yes"
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
mirrDY
Posts: 3
Joined: Tue Jun 01, 2021 11:40 am

Re: Can I just mark the '-' sign without '0'?

Post by mirrDY »

Villeroy wrote:You describe where you want to go without describing where you come from. There are thousands of different csv formats. Look a this one, for instance:

Code: Select all

31.05.2021;"XXXXXXX XXXX: XXXXXXXXXXXXXXXXXXXXXXXXXXX; XXXXX XXXXXXXX; XXXXXX XXX XXXX XXXXX XXXX XXXXXXXXXX XXX XXXXX- XXXXXXXX XXXXXXXXXXXX XXXXXXXXX";EUR;0,01;;1.113,63
It is semicolon separated since the numbers are written in German notation with comma as decimal separator, point as thousands separator (see last column) and with dates written as DD.MM.YYYY.
Open the file with a text editor, remove/replace confidential text and post it here.

----
Answer to the second question:
menu:Insert>Sheet From File
Check option "Link"
Specify the file and the import options.
Save as ODF spreadsheet (*.ods)
Close the spreadsheet, replace the text file and open again. Answer the update question with "Yes"
Thanks for your reply.

Here's my csv Content.
===============================================================================================================================
Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15,Col16,Col17,Col18,Col19,Col20,Col21,Col22,Col23,Col24
Date,Time,NG,OK,-,OK,0.00,V,NG,0.00,V,NG,0.00,%,NG,0.00,V,NG,0.00,V,NG,0.00,%,NG,
Date,Time,NG,OK,-,OK,0.00,V,NG,0.00,V,NG,0.00,%,NG,0.00,V,NG,0.00,V,NG,0.00,%,NG,
===============================================================================================================================
I hope the letter '-' is displayed as '-'.
But it displayed as '-0'
I don't want the whole zero to be absent.
If the content is '0', I hope so displayed '0' as it is.

and about your answer for my second question,
I create new csv file almost every day.
so I am reluctant to change the settings of the file directly every day, each file.
Is there any other way that is appropriate?
OpenOffice 4.1.10 on WIndows 10
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Can I just mark the '-' sign without '0'?

Post by RusselB »

When importing the CSV do you get a Text Import Dialog? I believe you should.
If you do, you can specify that the 5th column is to be imported as text. The problem with doing this, is that, if you actually have a number there, rather than the -, then that number will be treated as text, which makes doing calculations more difficult.
The dialog I'm referring to will also be the spot where you check the Detect Special Numbers option, which I'm suspecting you do, as some of your data (dates, and/or times) might import as text, rather than numbers with that unchecked.
The only other, quick, option that I can think of, is to do a Find & Replace searching for -0 and replacing it with -
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
mirrDY
Posts: 3
Joined: Tue Jun 01, 2021 11:40 am

Re: Can I just mark the '-' sign without '0'?

Post by mirrDY »

RusselB wrote:When importing the CSV do you get a Text Import Dialog? I believe you should.
If you do, you can specify that the 5th column is to be imported as text. The problem with doing this, is that, if you actually have a number there, rather than the -, then that number will be treated as text, which makes doing calculations more difficult.
The dialog I'm referring to will also be the spot where you check the Detect Special Numbers option, which I'm suspecting you do, as some of your data (dates, and/or times) might import as text, rather than numbers with that unchecked.
The only other, quick, option that I can think of, is to do a Find & Replace searching for -0 and replacing it with -
I think it's most reasonable to set all the columns in Text because I just want to use them for the viewer without editing them with OpenOffice Calc.
Is there a way to view all columns as Text Type without opening Text Import Dialog, other than setting the field in Text Import Dialog every time I open a file?
I want to know how to display all columns as Text, even if I always have to open Text Import Dialog, even if I don't set it up separately in the field section.
([Open File => Press OK in Text Import Dialog Window] I want to see what I want to see with just this.)
OpenOffice 4.1.10 on WIndows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Can I just mark the '-' sign without '0'?

Post by Villeroy »

csv is a database exchange format. There are databases and specialized text editors for csv. If you don't want any numbers, then don't use a program named "Calc".
mirrDY wrote:and about your answer for my second question,
I create new csv file almost every day.
so I am reluctant to change the settings of the file directly every day, each file.
Is there any other way that is appropriate?
This is trivial. Just save a copy or a symlink overwriting the old one.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply