HP Forums
Direct writing to 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: Direct writing to Spreadsheet (/thread-4728.html)



Direct writing to Spreadsheet - Powersoft - 09-16-2015 11:16 AM

hello,

Is it posible to write results direct to the Spreadsheet?
If yes where can I find Some example(s)

I working on a planet calculator,
so I calculate Some Numbers and wont
put them in a spreadsheet as a big overview.

Cheers,


RE: Direct writing to Spreadsheet - Thomas_Sch - 09-16-2015 12:26 PM

Are you looking for something like
Code:
Spreadsheet.Cell(1,4):=value
?
If you have more than one spreadsheet app, you have to
adjust the spreadsheet name accordingly,
for e.g.
Code:
spread1.Cell(2,3):=yourvalue

Cheers, thomas


RE: Direct writing to Spreadsheet - Tim Wessman - 09-16-2015 02:35 PM

Note that if you aren't trying to access by a numeric algorithm, you can also do Spreadsheet.A1, Spreadsheet.B2 and just use the direct cell reference. The "Cell" command allows you to use a number form for accessing the cell reference.


RE: Direct writing to Spreadsheet - cyrille de brébisson - 09-17-2015 06:38 AM

Hello,

You can also do:
A1:='A2+A3' to assign a formula to a cell.

You can also access the cell meta data/attributes using A1(n) or Cell(r, c, n)
Look at the help for Cell References and Cell for more information:

CELL ATTRIBUTES (n)
-1: all attributes. If the cell has nothing defined, returns -1, else return a list of 11 objects.
0: value (read only, you can not set the cell value)
1: formula
2: name
3: number format: Standard 0, Fixed 1, Scientific 2, Engineering 3, Floating 4, Rounded 5, unspecified –1
4: number of decimal places: 1 to 11, or unspecified = –1
5: font: -1: 0 to 6, unspecified = –1
6: background color: cell fill color (color, or 32786 if unspecified)
7: foreground color: contents color (color, or 32786 if unspecified)
8: horizontal alignment: Left = 0, Center = 1, Right = 2 , unspecified = –1
9: vertical alignment: Top = 0, Center = 1, Bottom = 2, unspecified = –1
10: show strings in quotes: Yes = 0, No = 1, unspecified = –1
11: textbook mode (as opposed to algebraic mode): Yes = 0, No = 1, unspecified = –1


Cyrille


RE: Direct writing to Spreadsheet - Thomas_Sch - 09-19-2015 04:00 PM

Any comments from user powersoft?
Are your questions answered?


RE: Direct writing to Spreadsheet - Powersoft - 09-19-2015 07:09 PM

Thanks all for this wonderful help.
I have tried it, and wat I won't to do could now be done.

Is it posible to rename a spreadsheet?

Cheers,

Jan


RE: Direct writing to Spreadsheet - Thomas_Sch - 09-19-2015 10:43 PM

(09-19-2015 07:09 PM)Powersoft Wrote:  Is it posible to rename a spreadsheet?
real Prime or virtual Prime: Pressing "Apps", you can use the "Save" button to create a new App.
In the Connectivity Kit, right click on an app, there ist a option "Rename" if it is a copy of a build in App.

Cheers Thomas