LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to spreadsheet Problem

Hi,
I try to write one line of data to a file with "Write to spreadsheet
File.vi". I would expect it adds an "End of Line" or CR at the end of
the line, so when I write the next line it will be a new one and not
appended to the existing line.
The problem is that when I try to read the data with Excel it's in one
line and Excel does read it only 256 columns and the rest is lost.

Does I have to add a EOL/CR on my own to make it work?

Thanks for any help
Urs

PS LabView version is 8.2, running under Win XP with Excel 2003
0 Kudos
Message 1 of 10
(3,831 Views)
Could you post a screenshot or copy of the code (only VI that is calling the "Write to spreadsheet" function?

Normally it should put the EOL in the file for each line when you have set "Append to file" to "TRUE".

André

Message Edited by andre.buurman@carya on 09-03-2007 05:22 AM

Regards,
André (CLA, CLED)
Message 2 of 10
(3,829 Views)
I do not see that behavior in 8.2.1.  Please post your code to see if the problem lies there.  Also, check the text file and confirm that data is in one row.
0 Kudos
Message 3 of 10
(3,816 Views)
andre.buurman@carya schrieb:
> Could you post a screenshot or copy of the code (only VI that is calling the "Write to spreadsheet" function?Normally it should put the EOL in the file for each line when you have set "Append to file" to "TRUE".AndréMessage Edited by andre.buurman@carya on 09-03-2007 05:22 AM


0 Kudos
Message 4 of 10
(3,814 Views)
I think the only problem here is that a "True" value needs to be wired to the "Transpose Array?" terminal of the Write to Spreadsheet VI.

(If you wire a 1D array to Write to Spreadsheet, it will indeed be written by default to a single spreadsheet "row", thus all coming out on a single line.)
0 Kudos
Message 5 of 10
(3,788 Views)
Urs Bögli schrieb:
> Hi,
> I try to write one line of data to a file with "Write to spreadsheet
> File.vi". I would expect it adds an "End of Line" or CR at the end of
> the line, so when I write the next line it will be a new one and not
> appended to the existing line.

Sorry for this question.
The only problem I have is taht Excel habdles huge files not as I
expected. When tehre are more than 256 columns it stops after reading
the first line respectively the 256 values of it. The rest get lost.

Could be made also in a way that (the beginning of) the next lines are
stored too into the sheet, but that's not the way how it works.
It's ok to read/ write with Labviw to the huge files anyway.

Urs
0 Kudos
Message 6 of 10
(3,770 Views)
Organise the data to have less than 256 columns.

Or use activeX automation to place the values in the Excel sheet. this also enable you to a extra sheets when you exceed the 256 column max.

Or I heard that the newest Excel version doesn't have the 256 column limit anymore, use that one instead.

André
Regards,
André (CLA, CLED)
Message 7 of 10
(3,754 Views)

Folks I'm having the same problem with "write to spreadsheet" and "mathscript.fprintf".

It writes correctly on my notebook , but doesn't work on an XP in the lab.

 

help

😞

0 Kudos
Message 8 of 10
(3,471 Views)
You're going to have to post a little bit more information than that!  Try posting you VI.Smiley Wink
Message 9 of 10
(3,464 Views)

Solved

 

Everybody 

Excel 2003 is limited to 256 columns (just open Excel 2003 and keep moving right.)

the file I created via "print to spreadsheet" and  "fprintf" both worked.

 

Excel 2007 did the trick. So it's a MS problem...

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