LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write string array to tab-delimited text file without Report Generation Toolkit

Solved!
Go to solution

I find that the Write to Spreadsheet File.vi does not work in Append TRUE mode.  http://digital.ni.com/public.nsf/allkb/D1629D863F0442CC86256A0200558A15

 

That url describes a workaround that involves creating a file in Excel first, saving it and then writing appends to it.  This is something the users of my compiled application are just not going to do.

 

The Write to Measurement File.vi generates tab-limited text files but only takes signals as input.

 

I would like to take my string array and simply write that to a tab limited file.  Is there really no way to do this from within LabVIEW without spending another $500?

0 Kudos
Message 1 of 18
(6,825 Views)

The Write to Spreadsheet File works perfectly for what you want. You did not read the information on that link very carefully. It says you cannot append to a native Excel file.

0 Kudos
Message 2 of 18
(6,820 Views)

I not only read it carefully.  I actually tried it many times.  When I tell it to append, I only get two rows of data, regardless.  It works fine in overwrite mode.

0 Kudos
Message 3 of 18
(6,814 Views)

Post your code. There is no problem with appending.

0 Kudos
Message 4 of 18
(6,807 Views)

Attached files show difference in Append False and Append True Write to Spreadsheet file.

 

1111ClientTable.txt  -- shows the data put into the file when Append is False

Indicator showing array being sent to Write to Spreadsheet with Append False.jpg -- shows array indicator of data going into Write to Spreadsheet when Append is False.

 

2222ClientTable.txt -- shows the data put into the file when Append is True 

Indicator showing array being sent to Write to Spreadsheet with Append True.jpg -- shows array indicator of data going into Write to Spreadsheet when Append is True

 

Write to spreadsheet section of code.jpg -- shows the array indicator and the Write to Spreadsheet File subVI.

0 Kudos
Message 5 of 18
(6,786 Views)

(Post continues due to limit on number of attachments.)

0 Kudos
Message 6 of 18
(6,785 Views)

Note that neither of the text files was ever opened in Excel to preclude the chance of accidentally changing the format.

0 Kudos
Message 7 of 18
(6,784 Views)

Since you did not attach any actual code that could be debugged, I wrote a small example that shows that data is appended when the input is True.

0 Kudos
Message 8 of 18
(6,766 Views)

I write strings rather DBL.  Anyway, I'm not saying it isn't supposed to work.  I'm saying I can't get it to work.  I believe that you are convinced.  Thanks for your contribution.

0 Kudos
Message 9 of 18
(6,761 Views)

I am not convinced of anything except there does not seem to be a problem with the LabVIEW function. I changed mine to write strings and everything still works. If you want help in finding out why your code does not work, you will need to provide something more than that small (and unrunnable) image.

0 Kudos
Message 10 of 18
(6,751 Views)