This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Konlab's profile picture

Speadersheet program - updated!

Started by Konlab, 23 May 2016 - 03:39 PM
Konlab #1
Posted 23 May 2016 - 05:39 PM
What is this?
This is a program you can make speadersheet with

Okay i know most of you don't read the texts so here is a screenshot:

Notice the function at the bottom?
More screenies (updated:)
Spoiler
Text is aligned left, numbers are aligned right


Non-advanced computer compatible

Download:
http://pastebin.com/MrYWEUXT
pastebin get MrYWEUXT speadersheet

Changelog:
Spoiler1.3: +Added keys u/h/j/k for copying one cell in given direction, changes function contents! (not finished yet)
+Added custom read function, so if you edit a cell the contents don't get wiped like before
http://pastebin.com/MrYWEUXT

1.2:
*Fixed functions can't add function results
*Now columns have proper titles
*Optimized function calculation (by saving previous results temporarily)
+Added functions: SUB, MUL, DIV, POW, COUNT
+Added column wideness variation (keys n and m)
http://pastebin.com/5wjJiAep

1.1:
* Fixed numbers on top in non-advanced computers
+Added functions!
(ADD and COPY)
http://pastebin.com/GQucBd9Q

1.0: http://pastebin.com/cAwcGmgp


[Warning! Don't read the code! Or you will discover some messy and unreadable hard Lua literature!]

Controls:
Spoiler(No use for mouse, sorry)
arrow keys = move
p/l = multiselect (move right bottom corner right/down)
enter = edit
home = first column
end = first row
page up = page up
page down = page down
s = save
q = exit
c = copy
v = paste (pastes from the upper right corner!)
x = cut
n = make column thinner
m = make column wider
u/h/j/k = copy cell up/left/down/right

Function format:
SpoilerAll functions begin with '='
Then comes the function name (Always in all CAPS)
Then you can input all cells you want as arguments
You can shorten things:
=ADD A1 A2 B1
can be:
=ADD A1,2 B1

=ADD A1 A2 A3 A4
can be:
=ADD A1,2,3,4
or
=ADD A1-4

Function list:
ADD adds every argument
COPY copies last argument
SUB substracts every arg from the first one
MUL multiplies every arg
DIV divides every arg from the first one
POW powers every arg from the first one
COUNT shows how many args are

TODO:
SpoilerThere is not much left I plan for this program, just a few things:
* Fix all forms of copy/pasting (sometimes they work sometimes they don't)
* Make a normal file format
* Update screenshots

Credits: Creator for the idea
Dog: for telling me the tostring thing to hide '.0' on the end of numbers

License: do anything you want to do with it but I'm not responsible for anything (but if you re-release you could credit me and +1, please)
Edited on 11 June 2016 - 09:10 AM
Dog #2
Posted 23 May 2016 - 05:51 PM
You're getting 1.0, 2.0, etc. at the top of your columns because you're not using tostring(). Convert the number to a string on line 126 and the .0 should be eliminated.
DannySMc #3
Posted 23 May 2016 - 05:59 PM
Could you upload this to my app store?:o/> I am working on a few updates, and one of them includes some new categories for programs that will be in, one of them is like Utilities like Word, Calculator, Spreadsheet, Powerpoint, and things like so, so this would be cool to be on my app store.

If you don't mind of course :P/> Link is here:
http://www.computercraft.info/forums2/index.php?/topic/22133-app-store-discover-api6/
TheRockettek #4
Posted 23 May 2016 - 06:16 PM
:P/> its not a speadersheets, its a spreadsheet ;)/>
Creator #5
Posted 23 May 2016 - 06:23 PM
Awesome. Now we need powerpoint. I also see you implemented file storing since the last time you showed me this.
Konlab #6
Posted 23 May 2016 - 06:27 PM
Thanks for your replies!

You're getting 1.0, 2.0, etc. at the top of your columns because you're not using tostring(). Convert the number to a string on line 126 and the .0 should be eliminated.
Thanks! Will correct!
Could you upload this to my app store? :o/> I am working on a few updates, and one of them includes some new categories for programs that will be in, one of them is like Utilities like Word, Calculator, Spreadsheet, Powerpoint, and things like so, so this would be cool to be on my app store.

If you don't mind of course :P/> Link is here:
http://www.computerc...-discover-api6/
Of course!
:P/> its not a speadersheets, its a spreadsheet ;)/>
Thanks! Corrected!
Awesome. Now we need powerpoint. I also see you implemented file storing since the last time you showed me this.
Power point is a good idea
Edited on 23 May 2016 - 04:30 PM
TheRockettek #7
Posted 23 May 2016 - 07:19 PM
KonLabs Office Bundle :P/>
DannySMc #8
Posted 24 May 2016 - 01:18 PM
KonLabs Office Bundle :P/>

I will actually name this under the Store xD As long as he can get out an alternative to:
Word
Powerpoint
Spreadsheet
Konlab #9
Posted 24 May 2016 - 02:01 PM
Nex update!
Added functions: =ADD A-C1
and =COPY G5

KonLabs Office Bundle :P/>

I will actually name this under the Store xD As long as he can get out an alternative to:
Word
Powerpoint
Spreadsheet
Word is hard :(/>
DannySMc #10
Posted 25 May 2016 - 12:21 AM
Nex update!
Added functions: =ADD A-C1
and =COPY G5

KonLabs Office Bundle :P/>

I will actually name this under the Store xD As long as he can get out an alternative to:
Word
Powerpoint
Spreadsheet
Word is hard :(/>

Yeah it will be :/
Selim #11
Posted 06 June 2016 - 03:30 AM
Suggestion: Make it able to read from CSV files. They are actually quite simple and should be easy enough to be able to load a spreadsheet from one.
randomdude999 #12
Posted 06 June 2016 - 06:45 PM
Some ideas for a text editor:
  • You could have an "insert mode", where the person enters text, and a "command mode", where they can control text color etc (yes I use vim).
  • Since ComputerCraft display is quite limited, there wouldn't be a lot of things to do in command mode, but they could control text/background color and maybe text alignment as well.
  • You could make the key to enter insert mode be "i" and to exit it Ctrl (can't use Esc since that exits the computer).
  • Maybe "b" background color control and "c" for text color.
  • And "a" to toggle alignment (between left, center and right, also justify if you implement it.).
  • Maybe select stuff with "s" then move to end point and "s" again. (Then you can apply color operations on it)
  • Maybe make a file menu accessible with "f" where you could save/open (/print? (color printing would be tedious)) stuff.
  • Maybe a status line that tells you what mode you are in and maybe the word count?
(I might have overused the word "maybe", but these are just suggestions)
Emma #13
Posted 06 June 2016 - 10:06 PM
–snip–
  • You could make the key to enter insert mode be "i" and to exit it Ctrl (can't use Esc since that exits the computer).
–snip–
Or, you could, ya no, just use the insert key.
Konlab #14
Posted 07 June 2016 - 06:57 PM
Some ideas for a text editor:
  • You could have an "insert mode", where the person enters text, and a "command mode", where they can control text color etc (yes I use vim).
  • Since ComputerCraft display is quite limited, there wouldn't be a lot of things to do in command mode, but they could control text/background color and maybe text alignment as well.
  • You could make the key to enter insert mode be "i" and to exit it Ctrl (can't use Esc since that exits the computer).
  • Maybe "b" background color control and "c" for text color.
  • And "a" to toggle alignment (between left, center and right, also justify if you implement it.).
  • Maybe select stuff with "s" then move to end point and "s" again. (Then you can apply color operations on it)
  • Maybe make a file menu accessible with "f" where you could save/open (/print? (color printing would be tedious)) stuff.
  • Maybe a status line that tells you what mode you are in and maybe the word count?
(I might have overused the word "maybe", but these are just suggestions)
I know vim too :)/>

The text editor is hard
Power point seems not that hard, but time consuming instead :(/>
And debugging this will be time consuming too, not sure if I can motivate myself ever
randomdude999 #15
Posted 07 June 2016 - 07:50 PM
–snip–
  • You could make the key to enter insert mode be "i" and to exit it Ctrl (can't use Esc since that exits the computer).
–snip–
Or, you could, ya no, just use the insert key.
Some new laptop keyboards don't even have an insert key. (For example my laptop (came preinstalled with win7))

–snip–

I know vim too :)/>

The text editor is hard
Power point seems not that hard, but time consuming instead :(/>
And debugging this will be time consuming too, not sure if I can motivate myself ever
Maybe I can help with debugging?
MKlegoman357 #16
Posted 08 June 2016 - 01:01 PM
Some new laptop keyboards don't even have an insert key. (For example my laptop (came preinstalled with win7))

All keyboards have an insert key. It might be hidden as a function key (fn). Or it's name might be shortened to something like "ins".
Konlab #17
Posted 09 June 2016 - 03:35 PM
Maybe I can help with debugging?
If you can find the source of bugs with copy pasting or with the copying I will give a HUGE CREDIT
randomdude999 #18
Posted 09 June 2016 - 10:14 PM
All keyboards have an insert key. It might be hidden as a function key (fn). Or it's name might be shortened to something like "ins".

Found it. fn+i. Completely unlabeled or anything. I just went to my text editor and started mashing keys with the fn key down.
Bye. #19
Posted 10 June 2016 - 10:42 PM
Hi, can I please add your program to my OS?
Konlab #20
Posted 11 June 2016 - 07:08 AM
Hi, can I please add your program to my OS?
Of course! :D/>
Bye. #21
Posted 11 June 2016 - 10:00 AM
Hi, can I please add your program to my OS?
Of course! :D/>/>
Thank you!