![]() |
[Request] restart a spreadsheet - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: [Request] restart a spreadsheet (/thread-1621.html) |
[Request] restart a spreadsheet - fabila - 06-15-2014 03:40 AM sorry for my English How to restart a spreadsheet or any app from a program? thanks RE: [Request] restart a spreadsheet - Angus - 06-15-2014 04:23 PM You can reset an app by pressing <DEL> in the Apps view. That will delete all variables. RE: [Request] restart a spreadsheet - fabila - 06-15-2014 04:58 PM thanks for your answer but I think I explained wrong, I want to reset the application using code, not using the buttons thanks RE: [Request] restart a spreadsheet - Angus - 06-15-2014 07:00 PM 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. RE: [Request] restart a spreadsheet - Dougggg - 06-16-2014 02:52 AM 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 RE: [Request] restart a spreadsheet - cyrille de brébisson - 06-16-2014 05:50 AM 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 RE: [Request] restart a spreadsheet - fabila - 06-16-2014 03:19 PM thanks for your ANSWERS, I found this post but the solution is not for the fimware 6030 http://www.hpmuseum.org/forum/thread-705.html?highlight=spreadsheet (02-19-2014 02:39 AM)josephec Wrote: Dear All, RE: [Request] restart a spreadsheet - Dougggg - 06-16-2014 05:42 PM 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 ![]() RE: [Request] restart a spreadsheet - eried - 06-16-2014 06:44 PM 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 :/ RE: [Request] restart a spreadsheet - fabila - 06-16-2014 06:50 PM 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. RE: [Request] restart a spreadsheet - cyrille de brébisson - 06-17-2014 05:30 AM 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 RE: [Request] restart a spreadsheet - Jsather - 06-25-2014 08:32 PM (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. RE: [Request] restart a spreadsheet - cyrille de brébisson - 06-26-2014 05:52 AM 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 RE: [Request] restart a spreadsheet - Jsather - 06-26-2014 02:38 PM I was using lower case. I've attached some screen shots to show my environment. RE: [Request] restart a spreadsheet - cyrille de brébisson - 06-27-2014 05:50 AM 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 RE: [Request] restart a spreadsheet - Thomas_Sch - 06-27-2014 07:37 AM Hello, I tried "A23:D24:={}", this worked. Combinations like "A23:D24(-1):={}" provided me with "Error: Bad argument type". What does "..(-1)" mean? RE: [Request] restart a spreadsheet - fabila - 06-27-2014 02:26 PM (06-27-2014 05:50 AM)cyrille de brébisson Wrote: hello 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:
RE: [Request] restart a spreadsheet - Jsather - 06-27-2014 05:22 PM 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. RE: [Request] restart a spreadsheet - Thomas_Sch - 06-27-2014 05:44 PM @Jsather: Thank you very much! I'll read the user manual more carefully. |