LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing a tab delimited file to excel is causing problems...

I am saving some signal readings from a Fluke to a spreadsheet file, and I keep getting an extra row in between each set of data that is recorded.  for example:

data,data,data,data

data,data,data,data

data,data,data,data


When I want to get:

data,data,data,data
data,data,data,data
data,data,data,data


Any ideas?  I can post some code, but I don't think it is needed.  Thanks in advance!
0 Kudos
Message 1 of 6
(2,461 Views)
Are you saving data as a string, dbl, other??  Are you using the "Write to Spreadsheet file" vi (or write to text) or a vi that you made??  Are you putting all three numbers in a cell or do you have a 3 by X running array??

How does the data come off the Fluke, an array of 3 numbers, array of strings, one long string???

If it is a string, it may already have a carraige return built into it, and then if you add antoher one while you are saving, then that is probably why you are seeing the gap.  But it is just a guess since I cant see your code or know how the data is acquired.

Just looking to get some more information.
Kenny

0 Kudos
Message 2 of 6
(2,456 Views)
Actually, you probably should post code and a sample of the file, since this kind of problem is usually some subtlety in the way you are storing your data.  A common problems is the data from your instrument contains CR or LF characters that are only being partially stripped or not stripped at the end character (e.g. you could be saving CR-LF-CR in the file).  But we can't diagnose this sort of thing without code and/or a sample file.

0 Kudos
Message 3 of 6
(2,435 Views)
I am using DBL as an input into a 'build array' vi.  I am then doing an 'array to spreadsheet string' vi that then goes to a 'build array' that feeds my 'write spreadsheet'.  I am also time stamping this that is inserted into the second 'build array' that I am using.  Here is my code,  I know it is a little rough around the edges, but it works... lol.  The write to spreadsheet command is in the bottom right corner of the inside while loop.  Thanks for the help.
0 Kudos
Message 4 of 6
(2,421 Views)

The extra line is caused by you using an extra Array to Spreadsheet String. This function appends a CR/LF to the end of the string. This function is also inside the Write to Spreadsheet File. Instead of converting your numeric data to a spreadsheet string, just convert it to a string array. You can use the Number to Fractional String for this.

Message Edited by Dennis Knutson on 08-01-2007 10:19 AM

Message 5 of 6
(2,419 Views)
That fixed it.  Thanks!
0 Kudos
Message 6 of 6
(2,389 Views)