LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Excel Chart to Labview front Pannel

Solved!
Go to solution
Highlighted

It is easy to copy and paste chart from and to excel,just as shown below:

1.png

 

But, how can I do this to labview front pannel? without typing elements one by one.just as below:

2.png

but ,in fact ,I have not found such input box than can accomplish this ,CAN NI offer some advice?

 

0 Kudos
Message 1 of 16
(825 Views)

There's no build in feature that makes LabVIEW behave like Excel...

 

You can either:

1) work it out manually with an event structure and custom menu's, or

2) use a excel ActiveX (maybe .net) container.

 

1) is tricky, because possibilities are limited.

2) is tricky, for the same reason actually...

0 Kudos
Message 2 of 16
(815 Views)

Can you explain better what you want to do?  [Attaching some code that shows what you are trying is even better, as there is less problem "translating" languages ...  But be sure to attach VIs, not pictures of block diagrams.]

 

Your title and text refers to an Excel Chart, but you seem to be showing some Excel cells holding string data.  I'm not sure what you want to do with this data.

 

Some questions:

  • Do you have the Report Generation Toolkit with your version of LabVIEW?  [You don't tell us much about your LabVIEW installation, nor can we tell much about your LabVIEW experience].
  • Do you want to obtain data from a small part of an Excel Worksheet, or get the entire Worksheet contents?  [You also don't tell us much about the Excel file you are using as input].

The Report Generation Toolkit includes an Excel Get Data function that will allow you to input a 1D or 2D array of String, I32, or Dbl data from a rectangular region in the Worksheet (you specify the starting cell for 1D data, and the corner cells for 2D data).  If you search the Web (or this Forum) for examples using Excel Get Data, you should find one I posted that was accepted as a "solution" ...

 

Bob Schor

0 Kudos
Message 3 of 16
(784 Views)

@Bob:

I interpreted it like this: he wants copy\paste to work in a LabVIEW Multicolumn Listbox, as it works in Excel. Not sure...

0 Kudos
Message 4 of 16
(774 Views)

Wiebe -- I suspect you are correct, and if so, it definitely will not work.  However, a vague Question cannot easily be specifically answered (who knows if you are answering the "intended" question?), so I opted for urging the OP to Post Clearly.

 

Bob Schor

0 Kudos
Message 5 of 16
(766 Views)

@Bob_Schor wrote:

so I opted for urging the OP to Post Clearly.

 

That would be best.

0 Kudos
Message 6 of 16
(763 Views)

It shouldn't be too hard to implement a Right-click plug-in for paste Excel cells into a LabVIEW table.

 

 

0 Kudos
Message 7 of 16
(753 Views)

wiebe preciously got my idea.
I want to do the mass input,so as to avoid type the elements one by one.

When I do "CTL+C" for an Excel chart area ,this chart is temparary in the clipboard.After this ,I move the cursor to a LaBVIEW front pannel input box(maybe a 2D string input box,just as the example I showed in the picture),with "CTL+V",then the copyed chart will massly inputted to LaBVIEW front pannel. just as "From Excel and to Excel",it is quite easy and quite common within Excel with such operation

0 Kudos
Message 8 of 16
(740 Views)

wiebe precisely got my idea.not"preciously",sorry

0 Kudos
Message 9 of 16
(733 Views)

The solution can and should be split up in a few sub problems.

 

+ Catching the copy event. Probably easy with menu events, regardless what control is used.

 

+ Getting the data from the clipboard. This could be very easy or very difficult. You can use simple application properties to get he clipboard text. But Excel might not put the data in text format on the clipboard. Windows APIs might be needed to get the data as a usable data structure in LabVIEW... I'll have to check myself, but can't do that on my tablet. If you can paste in notepad, you can use it in LabVIEW.

 

+ Then you put the (converted) data in the control.

0 Kudos
Message 10 of 16
(710 Views)