LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

export 1d array to an Excel column

Hello everybody,

I'm trying to export a 1D array to an Excel column... It doesn't work properly. I can't find the right delimiter to go from a line to another one.
Could anyone help me ?
Thanks

Billboule
0 Kudos
Message 1 of 10
(5,393 Views)
Hi Billboule,
i don´t know the vi´s you use. Do they work with ActiveX? Did you search the forum for Excel? There are lots of examples. Smiley Happy
Mike
0 Kudos
Message 2 of 10
(5,390 Views)
Hello Mike,

I don't think, that's using ActiveX, it's very simple.... You only have to had an Excel file opened with (in my case) a filename "Cartel1", and the datas are written directly in this opened file.
It's work fine when I want to export the 1D array as a line (see the attached exemple were R1 is Riga1=Line1), because the delimiter of the "Array To Spreadsheet String" is by default a Tab.

To export in a column, I only have to change R1 (line1) to C1 (column1) and find the correct expression for the delimiter (end of line character in this case)....

Does anyone know the delimiter syntax ? I have tried the " ^p " but it seems not to work...

Thanks
0 Kudos
Message 3 of 10
(5,386 Views)
Hi Billboule,
where are this vi´s from? Do you mean a spreadsheet file? If yes, then you can use the "Write To Spreadsheet file" function. Connect an array to it and it works.
Mike
0 Kudos
Message 4 of 10
(5,381 Views)
Thanks, I have had this part of VI from a collegue, but he can't help me more.
The VI "Write To Spreadsheet File" don't let me to customize the export (witch column...etc)
If anyone have another idee for the delimiter....
0 Kudos
Message 5 of 10
(5,364 Views)

Hi Billboule,

how do the vi´s work? Can you open them?

Mike



Message Edited by MikeS81 on 06-17-2008 04:46 PM
0 Kudos
Message 6 of 10
(5,362 Views)
I'm sory Mike, I don't understand your question... what do you meen with "them"?
0 Kudos
Message 7 of 10
(5,357 Views)
The VIs that are being used are an old mechanism of communicating with Excel, which is DDE. Frankly, I have no idea why you are using them. Opening the VIs won't really tell you anything in this case. All that it's doing is writing out a string to the opened Excel file starting at row R1. As for the delimeter, try the End of Line Constant character. It's in the Programming -> String palette.
Message 8 of 10
(5,347 Views)
"the End of Line Constant character. It's in the Programming -> String palette"

Thank you very much smercurio....That was what I was seraching for...
When I will have more time, I will adapt the communication with ActiveX...

0 Kudos
Message 9 of 10
(5,307 Views)

i want to eport around five different 1 d arrays , to different columns of the same excel sheet.

then how do i mention everytime to start with a new column ,...etc , label them?

0 Kudos
Message 10 of 10
(3,648 Views)