08-28-2013, 06:33 PM | #1 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
format integer cells as blank when 0
What do I put into the Custom Column format to make Integer cells show as blank when zero.
I read the python doco, nothing leapt from the page. Never entering a value is not an option, because I tab through them when I'm editing cells. |
08-28-2013, 07:28 PM | #2 | |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Series MUST have an index, even if it is Zero (and Zeros show) |
|
Advert | |
|
08-28-2013, 08:01 PM | #3 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
08-28-2013, 08:33 PM | #4 |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-28-2013, 08:55 PM | #5 | |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I want something like Code:
if (myValue){printf(myValue, %d);}else{printf("",%s);} |
|
Advert | |
|
08-28-2013, 09:01 PM | #6 |
Grand Sorcerer
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
-1000000 is the value of 'undefined' (and it seems to work)
|
08-28-2013, 10:39 PM | #7 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
a million PeterT, fortunately all my values are +ve,
It's much easier to spot the gaps when they're blank, works in bulk, I put the minus a million in my coffee/pasta library discovered I can add a book to current library using Windows Send To. Dunno why I didn't try it ages ago. br Last edited by BetterRed; 08-28-2013 at 10:44 PM. |
08-28-2013, 10:56 PM | #8 |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
08-28-2013, 11:25 PM | #9 |
....
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
|
Continuing OT
There are probably several ways of doing it so would be interested in BR's method. The one I use is put a shortcut to calibre.exe in the Windows SendTo folder (%APPDATA%\Microsoft\Windows\SendTo in Win 8 - think it has been same place for past versions of Windows if I recall correctly). This will give you Calibre as a right click option under Send To - it will send the file you right click on to the library currently open in Calibre. If Calibre isn't already running then Send To will open Calibre which opens at the last Library used if multiple libraries and adds the file to that Library. Note that this works for other applications too e.g. word processers, etc. EDIT: probably worth noting that one can delete redundant items out of the Send to folder too which removes them from the right click menu e.g. I dump the fax one as I would never use it. Last edited by AnotherCat; 08-28-2013 at 11:32 PM. |
08-28-2013, 11:37 PM | #10 | |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
in XP it should be at c:\Documents and Settings\theducks\Send To in Win 7 it'll probably a junction c:\Users\theducks\Send To that points at c:\Users\theducks\AppData\Roaming\Microsoft\Window s\SendTo If the folder is not visible you may need unhide it, on the Explorer Tools menu, click Folder Options, and then on the View tab, click Show hidden files and folders. Now drop a shortcut to calibre.exe into the blah blah\Send To folder, now you should see it in your Explorer, Send To menu. br |
|
08-29-2013, 12:00 AM | #11 |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Thanks BR
I never noticed the folder (I keep them un-hidden) before |
08-29-2013, 12:19 AM | #12 |
....
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
|
More OT -
BR's mentioning of this prompted me to see if there was a quicker way to add things to the Send To menu (I use it quite a lot when I want a file to open in the non-default application e.g. if want a txt file to open in MSWord instead of my default Notepad) and I discovered that one can create a Send To option in the Send To menu so that Send To sends to itself. Go to the SendTo folder in Explorer (as described above, or else Run shell:sendto gets one there too) and in the Explorer address line which will have, as BR puts it, blah/blah/SendTo in it. Grab the SendTo part with the mouse and drag it down into the list of Send To items. SendTo will now be in the Send to menu. So if want to add MSWord to the list? find winword.exe, right click and select Send to, then {*}left click SendTo. MSWord will now be in the Send to menu. This works in Win 8, I suspect it will work in previous versions. {*}Edit: got my left and rights confused. Last edited by AnotherCat; 08-29-2013 at 12:27 AM. |
08-29-2013, 01:53 AM | #13 |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I reserve Send To for actions that do not alter the original file, as in this instance with Calibre, for most purposes I have multiple options in the Open With menu.
You can send non ebook files to calibre, that's how I discovered this. I wanted to create 'books' for my library of Sunday boring talking head videos. I knew I could drop a FLV file onto the spreadsheet and get a book folder created, but I prefer to avoid the mouse. So I looked for a keyboard way - for me its Menu Key, N, N, Enter, Enter. br |
08-29-2013, 09:38 AM | #14 |
Grand Sorcerer
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
On topic: there is no format expression to display 0 as blank.
Solution 1: Use a composite column and a template that notices the value in the numeric column is zero. Solution 2: since the goal seems to be to notice them, use column coloring or a column icon to flag a cell with a zero value. |
08-29-2013, 10:47 AM | #15 | |
null operator (he/him)
Posts: 20,558
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
The baggage of Algol weighs heavily on the shoulders of those who struggle under its legacy. For 2 score or more Christmas's all I've wished for is a %z in a printf . My observation is that composite columns and colouring have a negative impact on Calibre performance... Also I would have to interpret the meaning of the colour or icon; which would impact on my performance. Whereas an an empty cell is self explanatory. So whilst ever it works, I'll use the '-1000000' solution BR Last edited by BetterRed; 08-29-2013 at 10:52 AM. Reason: grammar |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[SOLVED] Remove value accidentally added to custom integer column | macnab69 | Library Management | 11 | 07-07-2013 07:58 AM |
Method to set Date from user integer column | macnab69 | Library Management | 9 | 07-07-2013 07:52 AM |
Rounding to nearest integer in Custom Column - Hijri Year | oelgamal | Calibre | 2 | 03-28-2013 07:12 PM |
Rounding to nearest integer in Custom Column - Hijri Year | oelgamal | Recipes | 0 | 03-28-2013 02:58 AM |
PDF Format Blank Page | Wordsworth | Calibre | 0 | 08-07-2011 05:49 PM |