Post Reply 
[Request] restart a spreadsheet
06-15-2014, 03:40 AM (This post was last modified: 06-15-2014 03:46 PM by fabila.)
Post: #1
[Request] restart a spreadsheet
sorry for my English
How to restart a spreadsheet or any app from a program?
thanks
Find all posts by this user
Quote this message in a reply
06-15-2014, 04:23 PM (This post was last modified: 06-15-2014 04:23 PM by Angus.)
Post: #2
RE: [Request] restart a spreadsheet
You can reset an app by pressing <DEL> in the Apps view. That will delete all variables.
Find all posts by this user
Quote this message in a reply
06-15-2014, 04:58 PM
Post: #3
RE: [Request] restart a spreadsheet
thanks for your answer

but I think I explained wrong,

I want to reset the application using code, not using the buttons

thanks
Find all posts by this user
Quote this message in a reply
06-15-2014, 07:00 PM
Post: #4
RE: [Request] restart a spreadsheet
It don't know of a dedicated reset commands for apps (but I have still a way too limited Knowledge of the device)
However I would find no reason why you should not be able to purge a list of the needed Spreadsheet variables. Coded as a helper function would help to keep your Code clean.
Find all posts by this user
Quote this message in a reply
06-16-2014, 02:52 AM
Post: #5
RE: [Request] restart a spreadsheet
The spreadsheet is fairly easy to reset, it would appear that the spreadsheet data is stored as a list so you can clear it in your program with something like for example:

A1:m500={{}};

other apps might be harder to do that way if they have alot of varibles
Find all posts by this user
Quote this message in a reply
06-16-2014, 05:50 AM
Post: #6
RE: [Request] restart a spreadsheet
Hello,

Sorry, but there is no way to do this programaticaly...

Someone already posted a trick that works for the spreadsheet, but it is not universal...

note that the spreadsheet does NOT store it's content as lists.. But only gives you the illusion that it does.

cyrille
Find all posts by this user
Quote this message in a reply
06-16-2014, 03:19 PM
Post: #7
RE: [Request] restart a spreadsheet
thanks for your ANSWERS, I found this post but the solution is not for the fimware 6030

http://www.hpmuseum.org/forum/thread-705...preadsheet

(02-19-2014 02:39 AM)josephec Wrote:  Dear All,

Inside a program you can use this syntax:

In ROM 5106:
Spreadsheet.Cell(0,0,-1):=Spreadsheet.AA1000;
(You can use it from command line too)

BUT in ROM 5447 it DOESN´T WORK,
then I asked to Cyrille and no response,... I have a large program with many methods that mix all results in the spreadsheet ... or the user need to ERASE IT BEFORE RUNNING THE PROG.

PLEASE CYRILLE What is the new SYNTAX ??

best regards!!
joseph
Find all posts by this user
Quote this message in a reply
06-16-2014, 05:42 PM
Post: #8
RE: [Request] restart a spreadsheet
I wrote a couple of programs that produce data that I felt that putting the data into a spreedsheat would be good, when synced with the connectivity kit you could copy the data to an excel spreedsheet and that works. I put the code for the calcs in the app. I think the best way to use the new empty spreadsheet app I created was to use it as a template so when I need to use the app I select it an save it with a different name and run it and generate the data.

my calculator still freezes when I use the program editor for a long period so hp still has work to do on the firmware, so maybe they could add a reset app command while there at it Smile
Find all posts by this user
Quote this message in a reply
06-16-2014, 06:44 PM
Post: #9
RE: [Request] restart a spreadsheet
In RPN, oftenly when you are writing in a cell the calculator hangs and reboots and you lose all the data. But... it is not programatically :/

My website: ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
06-16-2014, 06:50 PM
Post: #10
RE: [Request] restart a spreadsheet
the spreadsheet is a good tool to present the output of an external program, because we can interrelate the output data between themselves very easily
but if I can not reset the application from within the prgrama lose some functionality and it becomes tedious and use the programs.
Find all posts by this user
Quote this message in a reply
06-17-2014, 05:30 AM
Post: #11
RE: [Request] restart a spreadsheet
Hello,

"Spreadsheet.Cell(0,0,-1):=Spreadsheet.AA1000;"
BTW, Cell(0,0,-1):={} would suffise...

Will NOT reset the spereadsheet, what it will do is that it will reset the cell 0,0, which correspond to the cell on the top left of the spreadsheet (the one with the HP logo)...

The original poster wants to reset the whole spreadsheet...
The best that I can think of to do this would be A1:ZZ9999(-1):={}

Cyrille
Find all posts by this user
Quote this message in a reply
06-25-2014, 08:32 PM
Post: #12
RE: [Request] restart a spreadsheet
(06-17-2014 05:30 AM)cyrille de brébisson Wrote:  The best that I can think of to do this would be A1:ZZ9999(-1):={}

The syntax "A1:ZZ9999(-1):={}" and variations referencing other cell ranges usually generate a "bad argument type" error in my attempts. As far as I'm concerned, fabila's very valid question remains unanswered: How can you clear cells of a spreadsheet from a program or Home screen command line?

Clearing would be the equivalent of selecting cells and pressing backspace. Cleared cells should take up no memory space and should return -1 when queried by Cell(R,C,-1). My own efforts to achieve this have been fruitless.
Find all posts by this user
Quote this message in a reply
06-26-2014, 05:52 AM
Post: #13
RE: [Request] restart a spreadsheet
hello

Quote:The syntax "A1:ZZ9999(-1):={}" and variations referencing other cell ranges usually generate a "bad argument type" error in my attempts

Are you sure? it works here for me?
are you not doing somehting like A1:Z99 ? this one would cause an error as Z has to be lower case...

cyrille
Find all posts by this user
Quote this message in a reply
06-26-2014, 02:38 PM
Post: #14
RE: [Request] restart a spreadsheet
I was using lower case. I've attached some screen shots to show my environment.


Attached File(s) Thumbnail(s)
               
Find all posts by this user
Quote this message in a reply
06-27-2014, 05:50 AM
Post: #15
RE: [Request] restart a spreadsheet
hello

(06-26-2014 02:38 PM)Jsather Wrote:  I was using lower case. I've attached some screen shots to show my environment.

how strange, it seems to work here for me...
and you are sure that "test" is a spreadsheet app?

can you try switching to the default spreadsheet app and try again?

cyrille
Find all posts by this user
Quote this message in a reply
06-27-2014, 07:37 AM
Post: #16
RE: [Request] restart a spreadsheet
Hello,
I tried "A23:D24:={}", this worked.
Combinations like "A23:D24(-1):={}" provided me with "Error: Bad argument type".

What does "..(-1)" mean?
Find all posts by this user
Quote this message in a reply
06-27-2014, 02:26 PM
Post: #17
RE: [Request] restart a spreadsheet
(06-27-2014 05:50 AM)cyrille de brébisson Wrote:  hello

(06-26-2014 02:38 PM)Jsather Wrote:  I was using lower case. I've attached some screen shots to show my environment.

how strange, it seems to work here for me...
and you are sure that "test" is a spreadsheet app?

can you try switching to the default spreadsheet app and try again?

cyrille

This syntax does not work for me, I get the same error as Jsather

creating a loop reset 2 row and 20 columns, this works, but it is very far that we are looking for and also is very slow,

Code:

            FOR B FROM 2 TO SIZE(DIMENSIONES)+1 DO
                FOR C FROM 1 TO 20 DO
                    Spreadsheet.Cell(B,C,-1):={"",−1,−1,−1,−1,32768,32768,1,−1,−1,−1};
                END;
            END;
Find all posts by this user
Quote this message in a reply
06-27-2014, 05:22 PM
Post: #18
RE: [Request] restart a spreadsheet
Cyrille: Same "bad arguments" result with Spreadsheet app. At a more basic level I, was able to execute a1(-1):={} and it did not reset a1. Then I tinkered for a while and found things had changed so that "a1(-1):={}" or just entering "a1(-1)" would generate the "bad arguments" error. I do not know how to get out of this state, even starting with a new spreadsheet. Is there any chance you are working with a special calculator or special version of 6030/6031?

Thomas: (-1) references all the attributes of a cell such as formula, name, number format, etc. as described in the user manual page 209. You have managed to null out the cell formula so that blank is displayed and 0 is returned, but all the attributes are active and taking up memory space. Column 0 and Row 0 formulas will not take effect in the cells you have "reset" unless you manually select them and press backspace.

FYI the manual and "Cell" help screen describing foreground and background color indexes are reversed. Index 6 is foreground color and Index 7 is background (or fill) color.

fabila: You have set the value of the "reset" cells to "" which takes up memory and doesn't allow column 0, row 0 formulas to take effect, same as with the formula Thomas tried.

I know two quick ways to tell if a cell is reset. 1) Cell(R,C,-1) will return -1 rather than a list with 11 entries. 2) Enter a simple formula in row 0 or column 0. For example: Is D4 reset? At D0 enter "=Row". The row number will then be displayed in every cell, D1,D2,... that is reset. If any attribute is active, even if a cell just has a fill color, the row number is not displayed.

I do not mean to be dismissive of any efforts but hope everyone keeps trying and someone succeeds. I would greatly like to know why a1:zz9999(-1):={} works for Cyrille but not all of us.
Find all posts by this user
Quote this message in a reply
06-27-2014, 05:44 PM
Post: #19
RE: [Request] restart a spreadsheet
@Jsather: Thank you very much!
I'll read the user manual more carefully.
Find all posts by this user
Quote this message in a reply
09-01-2024, 05:55 AM (This post was last modified: 09-01-2024 05:56 AM by ftneek.)
Post: #20
RE: [Request] restart a spreadsheet
If anyone is still looking for a way to reset the spreadsheet (or any) app from a program, try DelApp("Spreadsheet"). No results appear when searching for it in the help tree, but DelApp can be found under [Vars] -> System -> DelApp and was introduced here:

Quote:Apps and DelApps function

- neek
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)