cheekychops Posted February 5, 2009 Report Share Posted February 5, 2009 Hi I wonder if someone can please help me, I dont want anyone to do the work but points or hints on where I am going wrong would be really appreciated. Basically I have the following excel sheet, I want to read the first coulmn into one array and the other into another. 0.5012 0.0018 0.4961 0.0009 0.4902 -0.0003 0.4852 -0.0012 0.4791 -0.0022 0.4741 -0.0031 I have attached what I have done so far, I am guessing it outputs each row in and array?? so I end up with lots of arrays corresponding each row? is this right? Thanks Quote Link to comment
jdunham Posted February 5, 2009 Report Share Posted February 5, 2009 QUOTE (cheekychops @ Feb 3 2009, 05:40 PM) I have attached what I have done so far, I am guessing it outputs each row in and array?? so I end up with lots of arrays corresponding each row? is this right? The Index Array function has a row input and a column input. You have wired the row input, so you are getting the rows in your 1-D arrays. If you wire the bottom input instead, you will get the columns you crave. Have fun wiring! Quote Link to comment
jgcode Posted February 5, 2009 Report Share Posted February 5, 2009 QUOTE (cheekychops @ Feb 4 2009, 10:40 AM) Basically I have the following excel sheet, I want to read the first coulmn into one array and the other into another. jdunham is correct. Additionally: The Index Array function is expandable (so you don't need to use two) just pull down on the bottom of it to expand it & If you explicitly set and index then the next, same index is that value plus one (+1). I thought this was worth mentioning as it can neaten your code. http://lavag.org/old_files/monthly_02_2009/post-10325-1233720826.png' target="_blank"> Quote Link to comment
cheekychops Posted February 5, 2009 Author Report Share Posted February 5, 2009 Hi Thanks for the replies. I have attached what it looks like now. It works fine as long as I read the values from a TXT file. However when I try to upload the data from Excel it dont not output anything. Any idea why? I guess I am missing some inputs to the read from spreadsheet VI. Just cant workout which ones. hmm help says ReadFromSpreadSheetFile can open data from a excel datasheet saved in TXT format. is there anyway to modify this so Excel worksheet can be opened? Quote Link to comment
ejensen Posted February 5, 2009 Report Share Posted February 5, 2009 That's going to depend on which format you save the spreadsheet as in Excel. If it has to be a .xls for some reason, you might read here: http://zone.ni.com/devzone/cda/epd/p/id/3409. Otherwise, try saving as .csv or .xml in Excel. Either would make your task easier to accomplish. EDIT: I found this after my initial post: LINK. It may also be helpful. 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.