topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 4, 2024, 3:53 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Looking for Standalone CSV Editor like CSVPad  (Read 10651 times)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Looking for Standalone CSV Editor like CSVPad
« on: January 25, 2021, 04:25 PM »
When you work with Powershell, you have to work with CSV files.  I hate working with Microsoft Office (even though I'm a 365 admin! doh!), so Excel is out.

The best thing I've found so far is CSVPad - its interface is perfect and I love it - BUT you cannot open things with it via the commandline.  It was made from CSVForm, but the coder left out that part of the code. 

You see, I use FreeCommander, and I attach the little csv editor to a button on the toolbar.  So I can just select the csv file and click the button to get a quickie view/edit for the file.  Right now I'm using CSV Form, but it lacks a lot by way of usability.  CSVPad won't open the file because it lacks the commandline to open via %1.  I wish I had the source code for that (it's in Delphi, though).

Now, CSV Form is also in Delphi, but I don't know Delphi, and it would take me some time to get my head wrapped around it.

There are other csv editors out there, but they are either written in ugly Java or they are part of an office suite that I don't want.

What I'm looking for is a standalone app (not part of any suite) designed for CSV Files that is easy to see and use, and isn't a Java app.  I love toolbars.  I really just want CSV Pad to work correctly - that would be perfect.


Anyone have some ideas?  Or is anyone willing to make something nice out of CSVForm?
« Last Edit: January 25, 2021, 04:35 PM by BGM »

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #1 on: January 25, 2021, 05:47 PM »
Try CSVEd. I have had it around since version 1.4 and it's now at 2.5.6.
vi vi vi - editor of the beast

AzureToad

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 97
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #2 on: January 25, 2021, 07:08 PM »
Try CSVEd. I have had it around since version 1.4 and it's now at 2.5.6.
Nice! Man, is this program feature-rich!

I've been using Rons Editor and haven't had any problems other than the limit on rows. My company would rather we use Excel, but Rons was my preference.

Looks like CSVEd might take it's place.   :)

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #3 on: January 25, 2021, 11:22 PM »
https://www.syntax-k.de/projekte/teapot/

Seems to be able to do what you ask. But is from 2012, so rather old.

flamerz

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 157
    • View Profile
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #4 on: January 30, 2021, 01:54 AM »
Ron's editor, the best one by far.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #5 on: January 30, 2021, 04:42 PM »
They may not offer exactly what you want - and I haven't tried them - but Nir Sofer offers two utilities, both of which can be operated from the command line, as well as thee GUI:

CSVFileView v2.48 - CSV / Tab-delimited file viewer and converter for Windows
CSVFileView is a simple CSV file viewer / converter utility that allows you to easily view the content of CSV or tab-delimited file created by NirSoft utilities or by any other software, in a simple table viewer. You can sort the lines according to one of the fields, remove unwanted fields and change their order, and then save the result back into CSV file, tab-delimited file, XML file, or HTML report.

Known Limitations

    CSVFileView cannot load extremely large csv files.

TableTextCompare v1.20 - Compare csv / tab-delimited text files
TableTextCompare is a small utility that allows you to easily compare 2 tab-delimited or comma-delimited (csv) files, and find out the difference between the 2 files. You can use this tool for comparing 2 different snapshots of data, created by other NirSoft utilities, like DriverView, ServiWin, USBDeview, CurrPorts, WirelessNetView, ShellExView, and many others...
For example, You can use DriverView utility to save 2 snapshots of loaded drivers list into a tab-delimited file, and then use TableTextCompare to easily find out which device drivers were added, removed, or changed since the time that the first snapshot was taken.

TableTextCompare can make the comparison even if the records of the 2 files are not sorted in the same order, or if the fields are not positioned in the same order.
Looks like a "diff" for CSV files.


BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #6 on: February 05, 2021, 04:18 PM »
I've tried Ron's Editor (weird interface).  CSVFileView doesn't feel right.  I've tried TableTextCompare, too.  The Syntax-K thingy requires a special library...

I still haven't found what I'm looking for.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #7 on: February 05, 2021, 07:58 PM »
Teapot's interface feels like a spreadsheet. An old fashion spreadsheet. So I am not sure how well you would like that.

But it is free, tiny, portable and CSV is only one of the formats it supports. According to the included manual it can supports more file formats from old software like Lotus-1-2-3.

The manual:
Code: Text [Select]
  1. Teapot User Guide
  2. Michael Haardt, Jörg Walter
  3. http://www.syntax-k.de/projekte/teapot
  4.  
  5. For ages, spread sheet programs have been closely associated with finan-
  6. cial calculations done by typical end-users. But it has shown that there
  7. is also hacker’s work which can be done with them, like calculate monitor
  8. timings for various resolutions, produce convincing time statistics which
  9. justify the lack of documentation or the need for a budget increase to your
  10. employer. This first part of this user guide explains how the various func-
  11. tions of teapot are used, whereas the second part gives an introduction to
  12. spread sheets and explains the expression evaluator and its functions.
  13.  
  14. Contents
  15. 1 Copyright, Contributors and License 2
  16. 2 Introduction to Spread Sheets 2
  17. 2.1 General Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
  18. 2.2 The First Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
  19. 2.3 Differences Between User Interfaces . . . . . . . . . . . . . . . . . . . . . . 5
  20. 3 Command Mode 5
  21. 4 The Line Editor 7
  22. 5 Interactive Functions 7
  23. 5.1 Cell Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  24. 5.1.1 Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  25. 5.1.2 Exponential / Decimal . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  26. 5.1.3 Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  27. 5.1.4 Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  28. 5.1.5 Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  29. 5.1.6 Ignore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  30. 5.1.7 Transparent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  31. 5.1.8 Shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  32. 5.1.9 Column Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  33. 5.2 Block Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  34. 5.2.1 Copy/Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  35. 5.2.2 Fill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  36. 5.2.3 Clear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
  37. 5.2.4 Insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  38. 5.2.5 Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  39. 5.2.6 Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  40. 5.2.7 Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
  41. 5.3 Saving and Loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  42. 5.3.1 File names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  43. 5.3.2 File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
  44. 5.4 Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  45. 5.4.1 Goto Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  46. 5.4.2 Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  47. 5.4.3 Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  48. 5.4.4 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  49. 6 Batch functions 13
  50. 7 Expressions 14
  51. 7.1 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  52. 7.2 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  53. 7.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
  54. 7.4 Expression Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
  55. 8 Frequently Asked Questions 19
  56. 8.1 Why is 1.0 unequal 1.0? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
  57. 8.2 How do I hide intermediate results? . . . . . . . . . . . . . . . . . . . . . . 19
  58. 8.3 Why is there no conditional evaluation? . . . . . . . . . . . . . . . . . . . . 19
  59.  
  60. 2 INTRODUCTION TO SPREAD SHEETS
  61. 1 Copyright, Contributors and License
  62. TEAPOT (Table Editor And Planner, Or: Teapot), is copyrighted 1995–2006 by Michael
  63. Haardt, and 2009–2010 by Jörg Walter.
  64.  
  65. The implementation of clocked expressions is modeled after the description of clocked
  66. evaluation in the PhD work of Jörg Wittenberger at the University of Technology in
  67. Dresden, Germany. The trigonometric functions were inspired by Koniorczyk Mátyás.
  68. The context output format was contributed by Marko Schuetz.
  69. The (currently unused) message catalogs were contributed by Guido Müsch, Wim
  70. van Dorst, and Volodymyr M. Lisivka.
  71.  
  72. This program is free software: you can redistribute it and/or modify it under the
  73. terms of the GNU General Public License as published by the Free Software Founda-
  74. tion, either version 3 of the License, or (at your option) any later version.
  75. This program is distributed in the hope that it will be useful, but WITHOUT ANY
  76. WARRANTY; without even the implied warranty of MERCHANTABILITY or FIT-
  77. NESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  78. details.
  79.  
  80. You should have received a copy of the GNU General Public License along with this
  81. program. If not, see <http://www.gnu.org/licenses/>.
  82.  
  83. 2 Introduction to Spread Sheets
  84.  
  85. 2.1 General Introduction
  86. A spread sheet consists of cells formed by rows and columns. Additionally, in many
  87. spread sheets you have a third dimension, which you can imagine as various sheets
  88. laying on top of each other. The third dimension allows you to hide intermediate re-
  89. sults, show you additional results you do not want to appear in the “official” tables,
  90. keep sheets per time period (like 12 sheets for each month in a year) while allowing
  91. you to make calculations over the entire time interval and much more. Figure 1 shows
  92. the three dimensions:
  93. x
  94. y
  95. z
  96.  
  97. Figure 1: Three-Dimensional Spread Sheet Layout
  98.  
  99. You can think of cells as variables, which value is the value of an associated expres-
  100. sion. The expression may be constant, like 1.23, or it may be a function of other cell
  101. values. The advantage compared to a programmable calculator is that if you change
  102. a number, you directly see all changes in other cells caused by that. Often this allows
  103. you to get a feeling how much you may change basic sizes with still getting satisfying
  104. results without having to solve the problem analytically.
  105.  
  106. 2.2 The First Steps 2 INTRODUCTION TO SPREAD SHEETS
  107. Spread sheets offer many editing functions in order to modify, clear, copy and move
  108. cells or blocks of cells. Besides the usual mathematical functions, there are functions
  109. which work on blocks of cells, like calculating the sum of a block or counting all non-
  110. empty elements. Further there are functions working on character strings, because
  111. most likely you also want text besides numbers. The next section will introduce you to
  112. some of these by examples.
  113.  
  114. teapot is a traditional spread sheet and a typical UNIX program, because it does
  115. just one thing: Calculations. It does not include any graphics functions and never will,
  116. but it allows to export data in many formats, so you can use your favourite graphics
  117. software.
  118.  
  119. 2.2 The First Steps
  120. Now that you should have an idea, it is probably a good time to make your first steps.
  121. This section will show you how to create and save a sheet which contains two numbers
  122. and their sum. Start the program without any arguments 1 :
  123. teapot
  124.  
  125. You see an empty sheet with the cell cursor being at the upper left corner. Further, the
  126. status line tells you that this cell is really empty:
  127. E @(0,0,0)=
  128. The E means that you can edit the sheet. A V would mean that you could only view
  129. its contents. The meaning of @() will be explained soon. You are now in the command
  130. mode of teapot. Press the Enter key to edit this cell. A complete list of command mode
  131. functions will be given later. A prompt will appear below the status line:
  132. Cell contents: 1
  133.  
  134. Now the cell at position 0,0,0 has the integer constant 1. The status line shows you
  135. the cell contents, whereas in the sheet you see its value. Since constants are identical
  136. with their values, both are 1. Now move the cell cursor down one row and edit that
  137. cell, giving it the integer constant 41.
  138.  
  139. Now that you have two numbers, move the cell cursor to cell 0,2,0 and give that cell
  140. the following contents:
  141. Cell contents: @(0,0,0)+@(0,1,0)
  142. If you were confused about the difference between contents and value of a cell, it should
  143. become more clear now: The status line shows the contents, which is the arithmetic
  144. expression to calculate the sum of two cells, whereas in the sheet you see the value
  145. of that expression: 42, which was to be expected. @(x,y,z) is a function which takes
  146. three coordinates and returns the value of the cell at the given position.
  147.  
  148. As you can see, the arithmetic expression is not too readable. If you would move cells
  149. around, it would not even work any more. For these reasons, you can use symbolic
  150. 1 If you are using the graphical version of teapot, please see section 2.3 on page 5.
  151.  
  152. 2.2 The First Steps 2 INTRODUCTION TO SPREAD SHEETS
  153. names instead of coordinates, called labels. When used in an expression, a label is
  154. like a pointer to a cell, its data type is location. Move to cell 0,0,0 and use / (slash) in
  155. command mode to get into the main menu. Depending on your screen size, you may
  156. not see all of it. In this case, move the highlighted block right (or left) to scroll through
  157. it and to see all items. Now change its label attribute: A)ttributes, L)abel:
  158. Cell label: Paper
  159.  
  160. Then go one cell down and change its label to Tapes. After, move again one cell down
  161. and change the expression to:
  162. Cell contents: @(Paper)+@(Tapes)
  163.  
  164. As you see, you can call the function @ with three integer values or with one location
  165. value. Now the expression is more understandable, at least to you. To someone else,
  166. the sheet only contained three numbers, so a little text should be added.
  167.  
  168. To accomplish that, a new column needs to be inserted: B)lock, I)insert, C)olumn,
  169. W)hole column. The last menu item means that you want to insert a whole new column,
  170. not only a partial column. If you move the cursor around, you will see that everything
  171. is still fine, because you used labels. Go to cell 0,0,0 and edit it:
  172. Cell contents: "Paper:"
  173.  
  174. This is how you enter strings. A string is a data type on its own, don’t confuse this
  175. with labels. If you feel like it, leave the quotes and the colon away, and you will see
  176. the difference, because the result will not be a string, but the value of the label Paper,
  177. which is &(1,0,0).
  178.  
  179. Now change the cells below to "Tapes:" and "Result:". This is something that is
  180. understandable to others, too.
  181.  
  182. As the last step, save your work sheet to a file: F)ile, S)ave. The native file format
  183. is XDR, so choose that. Up to now, your sheet does not have a name, so you will be
  184. prompted for one:
  185. New file name: firststep
  186. Unless you see an error message after, your sheet is written to a file.
  187.  
  188. If you have come this far, quit (from the main menu) and you have successfully
  189. completed your first steps on using teapot.
  190.  
  191. Now you know cells, the difference between contents and values, you learned that
  192. labels are a good thing and you can do simple cell modifications as well as saving
  193. your work. This is enough for most applications.
  194.  
  195. If the capabilities described in the next section confuse you, then it is unlikely that
  196. you need them really. Just skip that section and don’t worry about it.
  197. You may wonder what happens if you have circular dependencies, i.e. you have a
  198. cell which evaluates to its own value plus one.
  199.  
  200. Well, the answer is that it depends on the order in which you create this cell. If you
  201. first give it the value 1 and after edit it to contain the expression which refers to
  202. itself plus 1, then you will find that each recalculation, like after editing other cells,
  203. will increase the value. While this may be funny, it is certainly not useful as you can
  204. not reset the cell and you have little control of its development.
  205.  
  206. 2.3 Differences Between User Interfaces 3 COMMAND MODE
  207. What you really want is a base value and an iterative expression along with a way
  208. to control the recalculations. teapot supports this by allowing two expressions per cell.
  209.  
  210. The expressions you have used so far are the ones which evaluate to the base values.
  211. Each time you edit a cell, the whole sheet will be reset, which means that all results
  212. are recalculated using the base values. After, you can clock the sheet, which is why the
  213. iterative part is also called clocked expression.
  214.  
  215. A clock is an atomic operation, which means that all cell results will be recalculated in a
  216. way that the new result will only show after the entire recalculation.
  217.  
  218. An examples will demonstrate how to make use of this feature. The notation x ->
  219. y means that x is the base expression and y is the clocked expression. Don’t let this
  220. confuse you, as both are entered separately: teapot does not have an -> operator, but
  221. it displays the cell contents this way for increased overview.
  222.  
  223. So, give the cell a base expression of 1 and a clocked expression of @(0,0,0)+1 (using
  224. ESC-Enter or Meta-Enter) and you will see:
  225. @(0,0,0)=1 -> @(0,0,0)+1
  226.  
  227. The sheet is currently in reset condition and the result is 1. Now clock it and you will
  228. see how the value increases.
  229.  
  230. After this introductional chapter, you should be familiar with the basic concepts in
  231. spread sheets. The next chapters explain all functions available in detail. You should
  232. read them to get an overview of the possibilities offered by teapot.
  233.  
  234. Finally, we will come back to using teapot by showing some common problems and
  235. their solutions.
  236.  
  237. 2.3 Differences Between User Interfaces
  238. TEAPOT comes in two flavours: A mouse-and-keyboard operated graphical application
  239. and a traditional console-based program. Large parts of this manual were written
  240. when the GUI version didn’t exist, so there may be occasional inconsistencies.
  241.  
  242. Most notably, a few key bindings don’t exist. If something doesn’t work as described
  243. in here, refer to the pull-down menus, where all functionality can be found.
  244.  
  245. In addition to the common keys, the GUI variant has extended mouse and keyboard
  246. bindings that work similarly to other GUI applications. There are not yet documented,
  247. but should “just work” as expected.
  248.  
  249. 3 Command Mode
  250. Right after starting teapot, you are in the command mode. Many functions from the
  251. command mode are also available from menus, but using keys is faster and some
  252. things, like moving the cell cursor, are only available through keys. Table 1 on the
  253. next page lists all available key bindings 2 .
  254.  
  255. . (Period) marks blocks: The first time it marks the beginning of a block, which is
  256. then extended by moving the cell cursor. The next time, it marks the end of the block
  257. which lets you move the cell cursor after without changing the block. The third time,
  258. it removes the block marks again.
  259.  
  260. 2 If you are using the graphical version of teapot, please see section 2.3.
  261.  
  262. 3 COMMAND MODE
  263. Function Key ASCII Key Function
  264. Next Line Ctrl-N Cursor down
  265. Previous Line Ctrl-P Cursor up
  266. Begin Ctrl-A Cursor to column 0
  267. End Ctrl-E Cursor to last column
  268. + Cursor to next layer
  269. - (Dash) Cursor to previous layer
  270. < Cursor to line 0
  271. > Cursor to last line
  272. _ (Underscore) Cursor to layer 0
  273. * Cursor to last layer
  274. Ctrl-X < One page left
  275. Ctrl-X > One page right
  276. F10 / Main menu
  277. F2 Save menu
  278. F3 Load menu
  279. Ctrl-X Ctrl-R Load file
  280. Enter Ctrl-J, Ctrl-M Edit cell contents
  281. “, @, digit, letter Overwrite cell contents
  282. Meta-Enter Esc Ctrl-J, Esc Ctrl-M Edit clocked cell contents
  283. Backspace Ctrl-H Edit cell contents
  284. . (Period) Mark block
  285. Ctrl-L Redraw screen
  286. Ctrl-Y Paste block
  287. Ctrl-R Reset sheet
  288. F9 Ctrl-S Clock sheet
  289. Esc z Save and quit
  290. Ctrl-X Ctrl-C Quit
  291. Next Page Ctrl-V One page down
  292. Previous Page Meta-V One page up
  293. Cancel Ctrl-G, Ctrl-C Abort current action
  294. Table 1: Key Bindings in Command Mode
  295.  
  296. 5 INTERACTIVE FUNCTIONS
  297. Function Key ASCII Key Function
  298. Previous Character Ctrl-B Move cursor left
  299. Next Character Ctrl-F Move cursor right
  300. Begin Ctrl-A Move cursor to column 0
  301. End Ctrl-E Move cursor to last column
  302. Enter Ctrl-J, Ctrl-M Finish editing
  303. Ctrl-L Redraw screen
  304. Ctrl-T Transpose characters
  305. Ctrl-\ Go to matching paren
  306. Cancel Ctrl-G, Ctrl-C Abort editing
  307. Backspace Ctrl-H Delete previous character
  308. Delete Ctrl-?, Ctrl-D Delete current character
  309. Insert Toggle insert mode
  310. Table 2: Key Bindings for the line editor
  311.  
  312. 4 The Line Editor
  313. Many functions in teapot require editing a line of text, e.g. editing cell contents, typing
  314. file names and the line. Similar to the command mode, all things can be reached by
  315. control codes and most by function keys. Table 2 lists all available key bindings 3 .
  316.  
  317. Besides the regular line editor functions, you may use Ctrl-O (Tab in the GUI ver-
  318. sion) to temporarily leave the editor in order to move around in the sheet if you are
  319. editing cell contents. Another Ctrl-O (resp. Tab) brings you back to the line editor.
  320.  
  321. While moving around in the sheet, you can insert the value (v) or position (p) at the
  322. cursor position in the edited cell. Clicking on a cell while editing has the same effect
  323. as moving to that cell and pressing (p).
  324.  
  325. Aborting line editing means that you will get right back to command mode, whatever
  326. you started doing will have no effect.
  327.  
  328. 5 Interactive Functions
  329. Most actions are available through the menu. Most of these will be applied to all cells
  330. within a block if a block of cells is marked.
  331.  
  332. 5.1 Cell Attributes
  333. Cells can have several attributes:
  334. • A cell label, which is useful because it avoids to directly address cells by their
  335. position. A cell label must be different from function names.
  336. • The cell adjustment, which determines if the cell value is printed left adjusted,
  337. right adjusted or centered.
  338.  
  339. These only apply to the console version. The GUI version has input fields that work
  340. like all other input fields.
  341.  
  342. 5.1 Cell Attributes 5 INTERACTIVE FUNCTIONS
  343. • The precision for the output of floating point values. The default is 2 digits after
  344. the dot.
  345. • If floating point numbers should be printed in scientific notation (0.123e1) or as
  346. decimal number (1.23). It only affects the output, if the cell value is a floating
  347. point number.
  348. • If the cell is shadowed by its left neighbor. This means that the left neighbor
  349. cell additionally uses the room of the shadowed cell.
  350. • If the cell is locked which prevents to accidentally edit or clear it. Note that
  351. block operations override this attribute, because when you deal with blocks, you
  352. usually know what you are doing.
  353. • If special characters for e.g. roff and L
  354. A T E X should be quoted (default) or not. Not
  355. quoting them allows special effects (if you know roff or L
  356. A T E X), but is of course not portable.
  357.  
  358. 5.1.1 Precision
  359. The precision only changes what is printed, teapot always uses the maximum precision
  360. for calculations. It also only affects the output if the cell value is a floating point
  361. number. Entering an empty precision means to set it to the default value.
  362.  
  363. 5.1.2 Exponential / Decimal
  364. Forces exponential notation for numbers in a cell. Decimal mode will prefer plain
  365. decimal numbers unless the result is very big or very small.
  366.  
  367. 5.1.3 Adjustment
  368. Cells contents can be aligned to the left, right or centered. By default, text is left
  369. adjusted and numbers are right adjusted.
  370.  
  371. 5.1.4 Label
  372. This function lets you edit the cell label of the current cell. Further it changes all
  373. occurrences of it in the cell contents to the new value, unless you erased the cell label.
  374. If a block has been marked by the time you edit the cell label, all occurrences of the
  375. label in contents of cells in that block will be changed.
  376.  
  377. 5.1.5 Lock
  378. You can lock cells to protect them from accidental editing. Note that this protects
  379. you from modifying single cells. If you modify a block of cells which contains locked
  380. cells, those will be modified as well. This has been done because when using block
  381. commands, you usually know what you are doing.
  382.  
  383. 5.2 Block Functions 5 INTERACTIVE FUNCTIONS
  384. 5.1.6 Ignore
  385. Ignored cells will be completely ignored. They appear as empty cells on screen and
  386. during calculations. This is useful for temporarily disabling parts of your calculation,
  387. as the former content reappears when the ignore is removed again.
  388.  
  389. 5.1.7 Transparent
  390. Usually, values are quoted as needed so that you get the exact same output as on
  391. screen. Transparent cells will be exported as-is into display-oriented file formats (L
  392. A T E X, etc.) so that you can embed commands for subsequent processing in cell
  393. values.
  394.  
  395. 5.1.8 Shadow
  396. Shadowed cells are effectively nonexistent. Instead, their left neighbor cell extends
  397. into the shadowed cell, so that longer text can be displayed. You may think of shadow-
  398. ing as a way to get multi-column cells.
  399.  
  400. 5.1.9 Column Width
  401. The column width only affects the screen display, not the formatting of the final output
  402. (except formatted text files). It is intended to let you make better usage of the screen
  403. for more overview. If the width is too small to display the cell value, a placeholder will
  404. be displayed.
  405.  
  406. 5.2 Block Functions
  407. 5.2.1 Copy/Move
  408. To copy a block of cells, mark it, then move the cell cursor to where the upper left
  409. corner of the copy should be and issue the copy command. Moving works similar, just
  410. use the move command. Of course you can mark three-dimensional blocks and copy
  411. them anywhere in the three-dimensional sheet, but doing so requires a good three-
  412. dimensional imagination to get what you want.
  413.  
  414. 5.2.2 Fill
  415. To fill a block of cells, first mark a the block it should be filled with. This may be just
  416. one cell! Then move the cell cursor to where the upper left corner of the block to be
  417. filled should be and issue the fill command. You will be prompted for how often the
  418. marked block should be repeated in each dimension. For example, you may to repeat
  419. a cell 9 times below. Mark it, then move down one row. Issue the fill command and
  420. answer 1 to the number of column repetitions, 9 to rows and 1 to layers.
  421.  
  422. 5.2.3 Clear
  423. Clearing means to delete the cell contents and set all attributes to the default value. If
  424. you want to preserve the attributes, just edit the contents of a cell and delete them.
  425.  
  426. 5.2 Block Functions 5 INTERACTIVE FUNCTIONS
  427. 5.2.4 Insert
  428. Since work sheets can be three-dimensional, you can insert cells in all three dimen-
  429. sions, too. The inserted cells will be empty and their attributes have the default values.
  430. Cells will always be moved away from the front upper left corner to make room for the
  431. inserted cells. If no block is marked, you will be asked if you really only want to insert
  432. a cell of if you want to insert a whole row, line or sheet.
  433.  
  434. 5.2.5 Delete
  435. Deleting works contrary to inserting. The deleted cells will be filled by moving neigh-
  436. bour cells to their positions. You will be prompted for the direction from where those
  437. cells will be taken. Deleting an entire column column-wise is done by marking the
  438. column, use the delete command and chose X direction.
  439.  
  440. 5.2.6 Sort
  441. Marked blocks of cells can be sorted after one or multiple keys, either column-wise,
  442. row-wise or depth-wise. Sorting a two dimensional block row-wise will sort lines, but
  443. if a three dimensional block is sorted row-wise, then horizontal layers will be sorted.
  444. The sort key is specified as vector which is orthogonal to the sorted elements, either
  445. in ascending or descending order. The following example illustrates the sort function.
  446.  
  447. The upper left part of the screen should look like this:
  448. 0 0 1
  449. 0 1 one
  450. 1 2 two
  451. 2 3 three
  452. 3 4 four
  453.  
  454. The box shows you which block to mark. Now this block should be sorted row-wise,
  455. with the sort key being the numbers in descending order, i.e. we want the lines being
  456. numbered 4,3,2,1. Go to the block menu, then select sort. Use R)ow, because that is
  457. how we want to sort this block. The X position of the sort key vector is 0, because
  458. the column 0 contains the numbers. The Z position is 0, too, because those numbers
  459. are on sheet 0. Now chose D)escending as direction. At this point, you could add
  460. a secondary key or decide to sort the block by the keys entered so far. Use S)ort
  461. region to sort it.
  462.  
  463. That’s it, the screen should look like this now:
  464. 0 0 1
  465. 0 4 four
  466. 1 3 three
  467. 2 2 two
  468. 3 1 one
  469.  
  470. 5.2.7 Mirror
  471. Mirroring a marked block of cells can be done in three directions: Left/right, up-
  472. side/down and front/back.
  473.  
  474. 5.3 Saving and Loading 5 INTERACTIVE FUNCTIONS
  475. 5.3 Saving and Loading
  476. 5.3.1 File names
  477. Usually, you want to overwrite the loaded file. For this reason, the loaded file name is
  478. remembered. If the sheet doesn’t have a file name, like after starting an empty sheet,
  479. you will be asked for a name when saving.
  480.  
  481. Occasionally, you may want to rename a sheet, like before making critical changes
  482. or when you load an existing sheet to have a start for making a new one. The Save As
  483. function allows you to save the file under a new name.
  484.  
  485. 5.3.2 File Formats
  486. XDR (.tp) XDR (eXternal Data Representation) is a standard invented by Sun Mi-
  487. crosystems which defines a canonical way of storing/transporting data on external me-
  488. dia. Its advantage is that it is widely available and that it defines a portable floating
  489. point number format.
  490.  
  491. The native teapot file format uses XDR so it is portable across different machine
  492. architectures and operating systems. The advantage of this over the portable ASCII
  493. format is that due to the (usually) missing conversion calculations any floating point
  494. constants will be saved/loaded exactly without conversion errors.
  495.  
  496. ASCII (.tpa) The ASCII file format allows easy generation/modification of saved sheets
  497. by shell scripts. Due to binary/ASCII conversion, there may be conversion errors in
  498. floating point constants. The default extension is .tpa.
  499.  
  500. CSV (.csv) CSV (comma seperated value) files only contain the data, not the expres-
  501. sions calculating it. Many spread sheets can generate this file format and many graph-
  502. ics programs like gnuplot(1) can read it. The field separator usually is a tab or comma,
  503. strings may be enclosed in double quotes and decimal numbers have a dot to mark
  504. the fractional part.
  505.  
  506. One popular variation uses semicolons for separating fields and a decimal comma
  507. instead of a decimal point, which teapot tries to autodetect.
  508.  
  509. On load, strings without quotes and with a 0x prefix followed by hexadecimal digits
  510. will be converted to integers. When loading CSV files, the sheet will not be cleared and
  511. the data will be load relative to the current cursor position.
  512.  
  513. SC SpreadsheetCalculator (.sc) teapot can load simple SC sheets to convert them
  514. to teapot’s native format. While loading, teapot converts all references to absolute cell
  515. positions to labels. This allows to insert and delete in such sheets without screwing
  516. the whole sheet up. teapot can not save sheets in SC format, because SC lacks many
  517. features. For now, only the most basic SC features are supported.
  518.  
  519. Lotus 1-2-3 (.wk1) teapot can load simple WK1 sheets to convert them to teapot’s
  520. native format. By default, 1-2-3 cell references are relative, so don’t be surprised by a
  521. big amount of relative references in the resulting teapot sheet. For now, only the most
  522. basic 1-2-3 features are supported.
  523.  
  524. 5.4 Other Functions 5 INTERACTIVE FUNCTIONS
  525. Formatted ASCII (.txt) The generated formatted ASCII files contain about what you
  526. see on the screen. If your sheet has more than one layer, then the various layers will
  527. be saved separated by form feeds.
  528.  
  529. Troff tbl (.tbl) teapot can generate tbl(1) table bodies in single files which are supposed
  530. to be used like this:
  531. .TS
  532. options;
  533. .so filename
  534. .TE
  535.  
  536. You will have to use soelim(1) to eliminate the .so requests before the tbl run. The
  537. options; are optional. If you use GNU roff, you will need to eliminate .lf requests,
  538. because this GNU roff extension confuses GNU tbl:
  539. soelim file | grep -v ’^\.lf’
  540.  
  541. Alternatively, you can generate a stand-alone document, which needs no further op-
  542. erations to format and print. Note: If no block is marked, the whole sheet will be
  543. saved.
  544.  
  545. L A T E X (.latex)
  546. If you generate L A T E X2 ε tables in single files, you include them in documents
  547. using the \include command. Alternatively, you can generate a stand-alone document,
  548. which needs no further operations to format and print. Note: If no block is marked,
  549. the whole sheet will be saved.
  550.  
  551. ConT E Xt (.tex) Analogous to L A T E X output, this generates input suitable to the
  552. ConT E Xt macro package.
  553.  
  554. HTML (.html) You can generate html table bodies in single files which could be used
  555. in combination with server-side includes. This feature differs between the various
  556. servers, so refer to the manual for your web server for details, please.
  557.  
  558. Alternatively, you can generate a stand-alone document. Note: If no block is marked,
  559. the whole sheet will be saved.
  560.  
  561. 5.4 Other Functions
  562. 5.4.1 Goto Location
  563. Sometimes, you directly want to go to a specific position, either to change its contents
  564. to see which cell a location expression refers to. This function lets you enter an expres-
  565. sion, which must evaluate to a value of the type location. If so, the cursor is positioned
  566. to that location. For example, you could enter &(10,2) to go to cell 10,2 of the current
  567. layer or you could enter the name of a label you want to go to. Relative movements are
  568. no problem, either.
  569.  
  570. 5.4.2 Shell
  571. Start a sub shell. Exiting from that sub shell will bring you back into teapot. This
  572. function does not exist in the GUI version.
  573.  
  574. 5.4.3 Version
  575. teapot will display its version number and copyright statement.
  576.  
  577. 5.4.4 Help
  578. If teapot was built with the integrated help viewer, you can access this manual from
  579. within teapot itself.
  580.  
  581. 6 BATCH FUNCTIONS
  582. Besides interactive facilities, teapot has a batch mode. Using this batch mode, shell
  583. scripts can generate output from teapot sheets. This is handy if you use make(1) to
  584. generate a bigger document containing tables, because you don’t have to generate a tbl
  585. or L A T E X file each time you modified a sheet: make will do so.
  586.  
  587. In batch mode, teapot reads batch commands from standard input. The following
  588. commands are available:
  589. goto location Go to the specified location.
  590. from location Start marking a block.
  591. to location End marking a block.
  592. sort-x d|a y z [ d|a y z ... ]
  593. sort-y d|a x z [ d|a x z ... ]
  594. sort-z d|a x y [ d|a x y ... ] Sorts the marked block as described in section 5.2.6 on
  595. page 10, column-wise, row-wise or depth-wise, respectively. "d" or "a" specify the
  596. sort order to be descending or ascending. x, y and z specify the position of the sort
  597. key relative to the first cell of the marked block. Up to eight sort keys can be
  598. specified.
  599.  
  600. This example reproduces the result from section 5.2.6:
  601. echo "
  602. from &(1,1,0)
  603. to &(2,4,0)
  604. sort-y d 0 0
  605. save-csv result_num.txt
  606. " | teapot -b doc/unsorted
  607. save-tbl file
  608. save-csv file
  609. save-latex file
  610. save-context file
  611. save-html file Save the marked block in the specified format as file.
  612. load-csv file Load file in the specified format to the last goto location. This is the
  613. same functionality as the interactive load described in subsection 5.12.4.
  614.  
  615. 7 Expressions
  616. Cells consist of a base (reset) expression, a clocked expression, and a current value. If
  617. the sheet is currently in the reset state (the default), all cells display their base value
  618. as current value.
  619.  
  620. When the sheet is clocked (see Table 1), the clocked expression is evaluated, using the
  621. current value of referenced cells. The new current value is the result of that evaluation.
  622.  
  623. 7.1 Data Types
  624. In teapot, each value has an associated data type. The following data types exist:
  625. Empty Empty cells have 0, 0.0 or “” as value, depending on context.
  626. String A string is a sequence of characters enclosed by double quotes: "This is a
  627. string".
  628.  
  629. A double quote can be part of the string, if it is quoted using a backslash: “\””.
  630. If you want the backslash to appear in the output instead of quoting the next
  631. character, use it to quote itself: “\\”.
  632.  
  633. Floating Point Floating point values are inexact, their precision and range depends on
  634. the implementation of the C type double on your system. An example is: 42.0
  635. Integer Integer values are exact, their range depends on the C type long on your sys-
  636. tem. An example is: 42
  637.  
  638. Location Cell labels and the &() function have this type, but there are no location
  639. constant literals.
  640.  
  641. Error Syntactical or semantical (type mismatch) errors cause this value, as well as
  642. division by 0 and the function error(). An error always has an assigned error
  643. message.
  644.  
  645. Functions and operators, when applied to a value of the type error,
  646. evaluate to just that value. That way, the first error which was found deep inside
  647. a complicated expression will be shown.
  648.  
  649. 7.2 Operators
  650. Unlike other spread sheets, the operators in teapot check the type of the values they
  651. are applied to, which means the try to add a string to a floating point number will result
  652. in an type error.
  653.  
  654. The following operators are available, listed in ascending precedence:
  655. x<y evaluates to 1 if x is less than y. If x or y are empty, they are considered to be 0 if
  656. the other is an integer number, 0.0 if it is a floating point number and the empty
  657. string if it is a string.
  658.  
  659. 7.3 Functions
  660. x<=y evaluates to 1 if x is less than or equal to y.
  661. x>=y evaluates to 1 if x is greater than or equal to y.
  662. x>y evaluates to 1 if x is greater than y.
  663. x==y evaluates to 1 if x is equal to y.
  664. x=y evaluates to 1 if the floating point value x is almost equal to the floating point
  665. value y. Almost equal means, the numbers are at most neighbors.
  666. x!=y evaluates to 1 if x is not equal to y.
  667. x+y evaluates to the sum if x and y are numbers. If x and y are strings, the result is
  668. the concatenated string. There is no dedicated logical OR operation, so use + for
  669. that.
  670. x-y evaluates to the difference if x and y are numbers.
  671. x * y evaluates to the product if x and y are numbers. There is no dedicated logical AND
  672. operation, so use * for that.
  673. x/y evaluates to the quotient if x and y are numbers.
  674. x%y evaluates to the remainder of the division if x and y are numbers.
  675. x^y evaluates to x to the power of y.
  676. -x evaluates to -x if x is a number. If x is empty, the result will be empty, too.
  677. (expression) evaluates to the expression.
  678. function(argument,...) evaluates to the value of the function applied to the values
  679. resulting from evaluating the argument expressions.
  680.  
  681. 7.3 Functions
  682. This section documents all available functions in alphabetical order. The functions are
  683. given in a C-like notation, so use @(0,0,0) instead of @(integer 0, integer 0,
  684. integer 0). If no type is given for the result of a function, it means the result type
  685. depends on the arguments. Brackets mark optional arguments.
  686. @([int x][,[int y][,[int z]]])
  687. @(location l) returns the value of the cell at position x, y, z. If any of x, y or z is
  688. omitted, the coordinate of the cell is used.
  689. location &([int x][, [int y][, [int z]]]) returns a pointer to the cell at location x, y, z. If z
  690. is omitted, the z position of the current cell is used. If y is missing as well, the y
  691. position (row) of the cell is used.
  692. string $(string env) evaluates to the contents of the specified environment variable. If
  693. the variable does not exist, then an empty string will be returned.
  694. float abs(float x)
  695. int abs(int x) evaluates to the absolute value of x.
  696. float acos(float|int x) evaluates to the arc cosine of x, where x is given in radians.
  697. float arcosh(float|int x) evaluates to the arc hyperbolic cosine of x, where x is given
  698. in radians.
  699. float arsinh(float|int x) evaluates to the arc hyperbolic sine of x, where x is given in
  700. radians.
  701. float artanh(float|int x) evaluates to the arc hyperbolic tangent of x, where x is given
  702. in radians.
  703. float asin(float|int x) evaluates to the arc sine of x, where x is given in radians.
  704. float atan(float|int x) evaluates to the arc tangent of x, where x is given in radians.
  705. clock(integer condition,[location[,location]) conditionally clocks the specified cell if
  706. the condition is not 0. If two locations are given, all cells in that range will be
  707. clocked. The return value of clock is empty.
  708. float cos(float|int x) evaluates to the cosine of x, where x is given in radians.
  709. float cosh(float|int x) evaluates to the hyperbolic cosine of x, where x is given in ra-
  710. dians.
  711. float deg2rad(float|int x) evaluates to the degrees that are equivalent to x radians.
  712. float e() evaluates to the Euler constant e.
  713. error error(string message) evaluates to an error with the specified message.
  714. eval(location) evaluates to the value of the expression in the cell at the given location,
  715. but evaluated in the context of the cell using eval(). This function may not be used
  716. nested any deeper than 32 times.
  717. float float(string s) converts the given string into a floating point number.
  718. float frac(float x) evaluates to the fractional part of x.
  719. int int(float x[,integer neg, integer pos]) converts x to an integer value by cutting off
  720. the fractional part. If given, the value of neg and pos determines how negative
  721. and non-negative numbers will be converted:
  722. neg/pos Result
  723. < -1 next smaller integer value
  724. -1 round downward
  725. 0 cut fractional part off (default)
  726. 1 round upward
  727. > 1 next larger integer value
  728. int int(string s) converts s to an integer number.
  729. string len(string s) evaluates to the length of s.
  730. float log(float|int x[,float|int y) evaluates to the logarithm of x. If y is specified, the
  731. result will be the natural logarithm, otherwise it will be the logarithm to the base
  732. of y.
  733. location max(location l1, location l2) evaluates to the maximum in the same way
  734. min does for the minimum.
  735. location min(location l1, location l2) evaluates to the location of the minimum of all
  736. values in the block marked by the corners pointed to by l1 and l2. Note that the
  737. empty cell is equal to 0, 0.0 and "", so if the first minimum is an empty cell, the
  738. result will be a pointer to this cell, too. If you are not interested in the location of
  739. the minimum but the value itself, use @(min(l1, l2)).
  740. int n(location l1, location l2) evaluates to the number of non-empty cells in the block
  741. marked by the corners pointed to by l1 and l2.
  742. poly(float|integer x, float|integer cn[, ...]) evaluates the polynome c n ·x n +...+c 0 ·x 0 .
  743. float rad2deg(float|int x) evaluates to the radians that are equivalent to x degrees.
  744. float rnd() evaluates to a pseudo-random number between 0.0 and 1.0.
  745. float sin(float|int x) evaluates to the sine of x, where x is given in radians.
  746. float sinh(float|int x) evaluates to the hyperbolic sine of x, where x is given in radians.
  747. string strftime(string f [, integer t]) evaluates to the time t formatted according to the
  748. format specified in f. Times in t are counted in seconds since epoch (1970-1-1
  749. 0:00). If t is empty or 0, the actual time is used. For the format specifications con-
  750. sult the man page of your c library, strftime (3). Example: @(now)=int(strftime("%s"))
  751. sets the field with label now to the actual time.
  752. string string(location l)
  753. string string(integer x)
  754. string string(float x[, [integer precision][, integer scientific]]) evaluates to a string con-
  755. taining the current value of the given cell at location l, or to the numeric value x
  756. with the given precision. The scientific flag determines if decimal (0) or scientific
  757. (unequal 0) representation is used.
  758. int strptime(string f, string datetime) evaluates to the seconds since epoch (1970-1-1
  759. 0:00) of the datetime string, parsed according to the format specified in f. For the
  760. format specifications consult the man page of your c library, strptime (3).
  761. string substr(string s,integer x,integer y) evaluates to the substring of s between x and
  762. y, which start at 0.
  763.  
  764. 7.4 Expression Grammar
  765. sum(location l1, location l2) evaluates to the sum of all values in the block marked
  766. by the corners pointed to by l1 and l2.
  767. float tan(float|int x) evaluates to the tangent of x, where x is given in radians.
  768. float tanh(float|int x) evaluates to the hyperbolic tangent of x, where x is given in
  769. radians.
  770. int x([location l])
  771. int y([location l])
  772. int z([location l]) evaluate to the x, y and z position of the given location, of the cur-
  773. rently updated cell if none is given. These functions are usually used in combination
  774. with the @ function for relative relations to other cells.
  775. digit::= 0 | .. | 9
  776. hex_digit::= 0 | .. | 9 | a | .. | f
  777. octal_digit::= 0 | .. | 7
  778. decimal_integer::= digit { digit }
  779. hex_integer::= 0x hex_digit { hexdigit }
  780. octal_integer::= 0 octal_digit { octdigit }
  781. integer::= decimal_integer | hex_integer | octal_integer
  782. float::= digit { digit } [ . ] { digit } [ e | E [ + | - ] digit { digit } ]
  783. quoted_character::= \ any_character
  784. character::= any_character | quoted_character
  785. string::= " { character } "
  786. identifier_character::= _ | @ | & | . | $ | alpha_character
  787. identifier::= identifier_character { identifier_character | digit }
  788. function::= identifier ( [ term ] { , [ term ] } )
  789. label::= identifier
  790. parenterm::= ( term )
  791. negterm::= - primary
  792. primary::= function | label | parenterm | negterm
  793. powterm::= primary { ˆ primary }
  794. mathterm::= powterm { / | * | % powterm }
  795. factor::= mathterm { + | - mathterm }
  796. term::= factor {< | <= | >= | > | == | != factor }
  797.  
  798. 8 Frequently Asked Questions
  799. 8.1 Why is 1.0 unequal 1.0?
  800. If your machine uses binary floating point arithmetic, and chances are that it does, you
  801. may eventually find yourself in the following situation:
  802. 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1
  803. You expect to see 1.0 as result, and indeed that is what you get. Now you compare this
  804. result to the constant 1.0, but surprisingly for many users, the result is 0. Apparently,
  805. 1.0 is unequal 1.0 for teapot.
  806.  
  807. This is not a bug in teapot, in fact it is not a bug at all. The problem is, that 0.1
  808. (1.0/10.0) does not have an exact representation in binary floating point arithmetic,
  809. similar to how 1.0/3.0 does not have an exact representation in decimal arithmetic (or
  810. binary, for that matter).
  811.  
  812. As such, a value very close to 0.1 is used, but when displaying it, it will be rounded to
  813. 0.1. The result is obvious, adding this number which is a little different from 0.1 ten
  814. times leads to a result very close to but not quite 1.0. Since it is so close, displaying it
  815. rounded to only a few digits precision shows 1.0.
  816.  
  817. To solve the comparison problem, teapot has the operator = (in contrast to the op-
  818. erator ==), which compares two floating point values apart from the last significant
  819. bit. Use this operator to compare the two values from above and the result will be 1,
  820. meaning they are about equal. Don’t assume that a number which can be expressed
  821. with a finite number of decimal digits will be represented exactly in binary floating
  822. point arithmetic.
  823.  
  824. 8.2 How do I hide intermediate results?
  825. If you used flat, two-dimensional spread sheets before, you are probably used to hidden
  826. cells which contain intermediate results, global constants, scratch areas and the like.
  827. teapot has no way to hide cells, but you have three dimensions. Just use one or more
  828. layers for such cells and give each cell a label in order to reference and find it easily.
  829.  
  830. 8.3 Why is there no conditional evaluation?
  831. There is no special operator or function for conditional evaluation. I could add one
  832. easily, but then next someone would ask for loops and someone else for user-defined
  833. functions, variables and so on. If you need a programming language, you know where
  834. to find it.
  835.  
  836. But don’t worry. The answer is, that conditional evaluation comes for free with
  837. teapot’s orthogonal cell addressing. As an example, depending on the cell labelled X
  838. being negative or not, you want the result to be the string "BAD or "GOOD".
  839.  
  840. This is the solution:
  841. eval(&((@(X)>=0)+x(BAD),y(BAD),z(BAD)))
  842.  
  843. The cell labelled BAD contains the string "BAD", its right neighbor contains the string
  844. "GOOD". If you have nested conditions, you could weight them with 1, 2, 4 and so
  845. on to address a bigger range of cells. Alternatively, you could make use of all three
  846. dimensions for nested conditions.
« Last Edit: February 05, 2021, 08:30 PM by Shades »

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #8 on: February 05, 2021, 08:24 PM »
Was CSVEd missing some feature that you needed? Or was the interface just too different?
vi vi vi - editor of the beast

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #9 on: February 19, 2021, 04:58 PM »
@x16wda - well, yeah, the interface mainly.  For one, it has it's GREAT BIG NAME AND VERSION NUMBER embedded in the main window.  Who needs that there?  Version number is in the title bar already. 

I really hate ribbons.  Good ole' Menus and Toolbars are what I crave.  Menus cram all the commands into one place organized by their main topic (their name on the main toolbar) so it's super easy to go through and find all the commands you want.  With ribbons, you have to and look at everything and decide what it is before you use it.  (I know, I'm nit-picking).  At least you can hide the ribbon until you actually need it.

I do wish it would display large icons instead of just small ones for it's toolbars.  I'm starting to get old.



It *does* have a lot of versatility, though, and is most likely the best program in this thread so far.
Actually, I think I'll start using this program.
« Last Edit: February 19, 2021, 05:12 PM by BGM »

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #10 on: February 19, 2021, 05:22 PM »
 ;D Yes, that it does! It is very different from CSVpad, I'd say a much more "primitive" interface and uses more screen space. At least it's not just wasted white space like so many programs (looking at you, MS 365 admin!).
vi vi vi - editor of the beast

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #11 on: July 13, 2021, 10:43 AM »
Anyone know how to disable the ad that shows at the bottom of Ron's CSV Editor?  I have the paid version.

Ah, never mind.  I had to re-add the license after I updated it.  Now it's gone.

anonymous29038

  • Participant
  • Joined in 2023
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Looking for Standalone CSV Editor like CSVPad
« Reply #12 on: May 25, 2023, 10:47 PM »
CSVPad is a really decent software, and I can't believe it doesn't support the most basic thing as opening files in the command line. This also means that it does not work with file associations, which is a huge pain. Fortunately I know some AutoHotkey to make it work. Thought I'd share the code here:

Code: Autohotkey [Select]
  1. ;@Ahk2Exe-SetMainIcon CSVpad.ico
  2. ;@Ahk2Exe-SetDescription CLI for the simple CSV editor
  3. ;@Ahk2Exe-SetVersion 1.2.0.1
  4.  
  5. SetWorkingDir %A_ScriptDir%
  6.  
  7. Files := A_Args[1]
  8.  
  9. Run CSVpad.exe,,, PID
  10. If (Files != "") {
  11.     WinWait % "ahk_pid" PID
  12.     DropFiles(Files, "ahk_pid" PID)
  13. }
  14. Return
  15.  
  16. DropFiles(FileList, wTitle="", Ctrl="", X=0, Y=0, NCA=0) {
  17.     characterSize := A_IsUnicode ? 2 : 1
  18.     fns:=RegExReplace(FileList,"\n$")
  19.     fns:=RegExReplace(fns,"^\n")
  20.     hDrop:=DllCall("GlobalAlloc","UInt",0x42,"UInt",20+(StrLen(fns)*characterSize)+characterSize*2)
  21.  
  22.     p:=DllCall("GlobalLock","UPtr",hDrop)
  23.     NumPut(20, p+0)  ;offset
  24.     NumPut(x,  p+4)  ;pt.x
  25.     NumPut(y,  p+8)  ;pt.y
  26.     NumPut(0,  p+12) ;fNC
  27.     NumPut(0,  p+16) ;fWide
  28.     NumPut(A_IsUnicode ? 1 : 0,  p+16) ;fWide
  29.  
  30.     p2:=p+20
  31.     Loop,Parse,fns,`n,`r
  32.     {
  33.         DllCall("RtlMoveMemory","UPtr",p2,"Str",A_LoopField,"UPtr",StrLen(A_LoopField)*characterSize)
  34.         p2+=StrLen(A_LoopField)*characterSize + characterSize
  35.     }
  36.     DllCall("GlobalUnlock","UPtr",hDrop)
  37.     PostMessage, 0x233, hDrop, 0, %Ctrl%, %wTitle%
  38. }