tpdk Posted July 7, 2007 Report Share Posted July 7, 2007 Hi, I've been trying to format output string from SR430 multichannel scalar into a single column data so that the data can be easily read using excel. The out put from SR 430 is of the form 1.000000e+001,2.000000e+000, 4.000000e+001, ....., and so on. I'm pretty new to LabVIEW and programming in general. Can anyone please help me out? Thanks. The size of the data is about 60KB. Tpdk Quote Link to comment
crelf Posted July 7, 2007 Report Share Posted July 7, 2007 QUOTE(tpdk @ Jul 6 2007, 02:57 PM) The out put from SR 430 is of the form 1.000000e+001,2.000000e+000, 4.000000e+001, ....., and so on. Can you post a full data string or file? Your string is inconsistant: for example, there's a "," between the first two records, and a "," plus a space between the second two records. Here's an example of what I *think* you're after: http://forums.lavag.org/index.php?act=attach&type=post&id=6319''>http://forums.lavag.org/index.php?act=attach&type=post&id=6319'>http://forums.lavag.org/index.php?act=attach&type=post&id=6319 Quote Link to comment
Matheus Posted July 11, 2007 Report Share Posted July 11, 2007 Hello... I agree fully, but to change more easy, use the TAB constant as delimiter, this is more used when we import a TEXT using EXCEL. %.;%.5f -> float number with five significant digits using coma. good luck! QUOTE(crelf @ Jul 6 2007, 09:33 AM) Can you post a full data string or file? Your string is inconsistant: for example, there's a "," between the first two records, and a "," plus a space between the second two records. Here's an example of what I *think* you're after:http://forums.lavag.org/index.php?act=attach&type=post&id=6319''>http://forums.lavag.org/index.php?act=attach&type=post&id=6319'>http://forums.lavag.org/index.php?act=attach&type=post&id=6319 Quote Link to comment
crelf Posted July 12, 2007 Report Share Posted July 12, 2007 QUOTE(Matheus @ Jul 11 2007, 07:24 AM) ...but to change more easy, use the TAB constant as delimiter, this is more used when we import a TEXT using EXCEL. I don't agree - Excel handles a range of delimters including TAB and COMMA, and I don't think that either of them is better than the other - it really depends on what you're trying to do. Quote Link to comment
Jeff Plotzke Posted July 12, 2007 Report Share Posted July 12, 2007 QUOTE(crelf @ Jul 11 2007, 11:12 AM) I don't agree - Excel handles a range of delimters including TAB and COMMA, and I don't think that either of them is better than the other - it really depends on what you're trying to do. I would say using a tab is much better, especially for numerical data. Throughout Europe (and other countries) where a comma is the decimal separator, a comma delimeted spreadsheet could turn into a nightmare! I typically only use tabs for delimited files. Quote Link to comment
crelf Posted July 12, 2007 Report Share Posted July 12, 2007 QUOTE(Jeff Plotzke @ Jul 12 2007, 02:30 AM) I would say using a tab is much better, especially for numerical data. Better? Possibly. Much Better? I don't think so. Sure, tabbed data is great for files that need to be easily human readable (everything lines up real purdy), but if the file only needs to be machine readable, then the delimiter is irrevant, as long as there is one and it doesn't appear anywhere in the data. As for the comma being used as a decimal deliniation in Europe - that's true, but I *think* that practise is slowly on the way out - anyone from over the ditch care to comment? Quote Link to comment
tpdk Posted July 17, 2007 Author Report Share Posted July 17, 2007 QUOTE(crelf @ Jul 6 2007, 08:33 AM) Can you post a full data string or file? Your string is inconsistant: for example, there's a "," between the first two records, and a "," plus a space between the second two records. Here's an example of what I *think* you're after:http://forums.lavag.org/index.php?act=attach&type=post&id=6319''>http://forums.lavag.org/index.php?act=attach&type=post&id=6319'>http://forums.lavag.org/index.php?act=attach&type=post&id=6319 Dear Crelf, I'm sorry for a very late reply. Thank you very much for your help. It works! I used a portion of your code; I used string to array which gives data in a row in excel, not in column. What I did was I changed that array into matrix and chage matrix back to array. I get 2D array back. Then I used write to spreadsheet. Then I got the data in column format. Maybe it's not the best way to do, but it works. I appreciate your help. Thank you. Tpdk Quote Link to comment
crelf Posted July 17, 2007 Report Share Posted July 17, 2007 QUOTE(tpdk @ Jul 16 2007, 03:41 PM) I appreciate your help. Thank you. You're absolutely welcome - any time Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.