LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Spreadsheet to the Front Panel

Hi,
 
I want to add something like a spreadheet to my front panel and I need some recommendations.  I want to allow values to be entered at runtime and I like the ability of locking certain cells and changing font attributes of cells.
 
I tried adding an ActiveX Document (Create Document or Object from File) but the spreadsheet can't be edited at run-time but I think I can access all the properties and methods I need.  I also tried adding the Microsoft Office Spreadsheet in Create Control (ActiveX also) and it behaves well on the Front Panel but I can't figure out how to get to the properties I need like values in a certain range.  I think I have a problem using the Variant to Data function; I can't figure out how to make a type for Variant to Data.
 
I'm relatively new to LabVIEW so I might be missing something obvious but I think I have good general understaning of it.  I'm normally a C/C++ programmer.
 
Thanks,
Albert
0 Kudos
Message 1 of 18
(3,920 Views)
Here is a vi to use as an example if you want to use active x. If you have LV 8 just use a table and set the parameters as desired. If you need anymore assistance i will try to help.



Joe.
"NOTHING IS EVER EASY"
Message 2 of 18
(3,909 Views)

Hi,

Thanks.  That was too easy.  I got carried away with indicating certain worksheets and I might have to bug you or someone else later.

I tried using a table but I don't think specific cells can be protected or have different background colors.  Is that right?

Thanks,
Albert

 

0 Kudos
Message 3 of 18
(3,898 Views)

Here is an addition to the same vi that shows how to do a couple of things with a table.

Also around here if you like an answer and it works for you please rate it.




Joe.
"NOTHING IS EVER EASY"
Message 4 of 18
(3,886 Views)

hi Joskins,

can you pls save the VI for LV7.1 & repost it ?

Regards,

Partha.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 5 of 18
(3,869 Views)
Here it is in 7.1. You do not have all the functionality in 7.1 for the table though.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 6 of 18
(3,860 Views)

Hi,

I'd like to have some cells be automatically updated (by Compact FieldPoint data) but this seems to disturb any manual edits that are occuring.  You can see this in my modification of Jhoskins' VI where I made it so that a cell is updated every 250ms.  I put my VI up at http://www.netaxs.com/~albertm/download/t/excel%20style%20spreadsheetAMM.vi

Even if I could know when manual edits are happening it might allow me to temporarily disable updates.

Thanks,
Albert

0 Kudos
Message 7 of 18
(3,827 Views)
Hi,

I saw the StartEdit and EndEdit events but I couldn't see any way of capturing them.

Thanks,
Albert
0 Kudos
Message 8 of 18
(3,808 Views)

Hi,

Well, I've been having fun with my spreadsheet but now I realize that it eats up memory.  A range of A1:C5 eats up about 4K per second; you can watch it in the Task Manager.  I suspect that the spreadsheet is allocating memory when Value2 is read and it's never deallocating it.  I'm trying to log data over a long time and after a while I can't read the spreadsheet any more and I get an out-of-memory message.

Is there a way at least to make my VI or the spreadsheet get more memory to waste so it can last longer?

Thanks,
Albert

0 Kudos
Message 9 of 18
(3,736 Views)
Truthfully I would just use a table, Set the parameters like you want them to be. Yes the spreadsheet control gives you some nice features, but and an extreme cost. i would like to see your code because there may be something in there that is causing the memory leak. Could you post it or at least a screen shot. This will help us help you.



Joe.
"NOTHING IS EVER EASY"
Message 10 of 18
(3,730 Views)