LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GRAPH export vers Excel

Bonjour,

 

Dysfonctionnement de la récupération du contenu d'un graphe vers excel

 

j'utilise la méthode ExportDonnéesVersExcel (géré par un évènement lors de l'appui sur une touche) pour récupérer les données d'un graphe déroulant. Les données sont bien écrite dans une feuille excel, la première colonne contient bien l'horodatage, mais sur la première ligne, première colonne, c'est le nom de m, trace qui est inscrit, alors que ce devrait être l'horodatage (espace vide ou autre, mais pas le nom de ma trace).

Ce qui fait que les noms de mes traces reportés dans la première ligne et sont décalés d'une cellule vers la gauche.

L'export vers le presse papier à le même résultat.

 

Contenu de la feuille après exécution de la méthode

Mesure1                |Mesure2  -Mesure3  |Mesure4

2024/01/18 12:22  |0.23         |23.5         |653.3

 

Contenu correct

                              |Mesure1  |Mesure2  |Mesure3

2024/01/18 12:22  |0.23         |23.5         |653.3

 

Quel qu'un aurait t'il résolu ce problème ?.

 

 

0 Kudos
Message 1 of 12
(858 Views)

Hi TBU,

 


@TBU_SNEF wrote:

Good morning,

 

Malfunction in retrieving the contents of a graph to Excel

 

I use the ExportDataToExcel method (managed by an event when a key is pressed) to retrieve data from a scrolling graph. The data is well written in an excel sheet, the first column contains the timestamp, but on the first line, first column, it is the name of m, trace which is written, whereas it should be the timestamp ( empty space or other, but not the name of my trace).

Which means that the names of my traces are reported in the first line and are shifted one cell to the left.

Exporting to the clipboard has the same result.


When testing that method I get an Excel sheet with two columns (for my empty graph) with headers of:

Time - Plot 0 Amplitude - Plot 0

Seems correct for me.

 

So the problem could be your VI or your LabVIEW installation. Please provide as much information as possible on both...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(854 Views)

Bonjour,

 

 Voici le projet permettant d'envoyer le contenu d'un graphe vers Excel sur lequel j'ai le problème du nom des colonnes. Cette fois-ci je ne peut pas avoir une ligne contenant l'horodatage et la suite des valeurs.

Download All
0 Kudos
Message 3 of 12
(775 Views)

Hi TBU,

 


@TBU_SNEF wrote:
Here is the project allowing me to send the contents of a graph to Excel on which I have the problem with the column names. This time I cannot have a line containing the timestamp and the sequence of values.

You don't use a graph, you use a chart. Please describe your problem as precise as possible!

 

  • Why do you use so many local variables with unused terminals?
  • Why don't you use shift registers?
  • Do you know there is a special function to convert an array to a cluster?
  • Do you really need to handle 128 channels/signals within one chart?
  • Why don't you write the data to a file on your own instead of relying on that pre-defined chart method?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(771 Views)

J'ai simplifier le VI. Mais comment avoir la feuille Excel de la forme CourbesExcel2.png alors que le VI me donne la feuille CourbesExcel1.png avec le contenu de la ligne décalée vers la gauche.

 

J'ai aussi modifie le type de données en entrées du graph, le résultat CourbesExcel3.png et CourbesExcel3VI.

0 Kudos
Message 5 of 12
(747 Views)

Hi TBU,

 

it really would help when you would write your questions in English in this worldwide forum!

 


@TBU_SNEF wrote:

I simplified the VI. But how can I have the Excel sheet of the form CurbesExcel2.png while the VI gives me the sheet CurbesExcel1.png with the content of the line shifted to the left.

 

I also modified the data type of the graph inputs, the result CourbesExcel3.png and CourbesExcel3VI.


As suggestion:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(740 Views)
Hello, your example worked well see image. the column (for the time and date) and line 1 I added it. But how to retrieve the date and time in the graph? I'm using 2015 SP1 f11 32-bit version, I can't change it. I don't have an internet connection for an update.

 

0 Kudos
Message 7 of 12
(694 Views)

Hi TBF,

 


@TBU_SNEF wrote:
Hello, your example worked well see image. the column (for the time and date) and line 1 I added it. But how to retrieve the date and time in the graph? I'm using 2015 SP1 f11 32-bit version, I can't change it. I don't have an internet connection for an update.
But how to retrieve the date and time in the graph?

You don't use a graph, you use a chart. Charts don't handle "time", they just display data.

You need to collect your time data in a different way and build an array of timestamps to create the first column of your CSV file.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(685 Views)
 
Thank you for your response, I had started to develop your method, but I wanted to know first if this function did not already exist in the graph before launching into development. Too bad, it would have been nice if we could recover the complete data in a method. But, how come when using the "exportExcel" method associated with the graph I was able to recover a date and time per line in Excel? (line1 = Col1)
 
 
 
0 Kudos
Message 9 of 12
(673 Views)

Hi TBF,

 


@TBU_SNEF wrote:
Thank you for your response, I had started to develop your method, but I wanted to know first if this function did not already exist in the graph before launching into development. Too bad, it would have been nice if we could recover the complete data in a method. But, how come when using the "exportExcel" method associated with the graph I was able to recover a date and time per line in Excel?

Maybe you were plotting waveforms?

You still mix the terms "graph" and "chart"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(667 Views)