Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66852

Fixed width spreadsheet string to array

$
0
0

I have to read a file that is in a format with a fixed width per column, and an unknown number of columns. Is there a simple way to convert this in to an array - basically a "Spreadsheet string to Array".  

 

I have a working method, but it is not exactly elegant and is somewhat slow for larger data sets. It also (currently) has the problem of stopping if there is a blank line in the data set. I can fix that by scanning for tokens (cr/lf), finding the number of lines, replacing that outer "while" loop to a for loop, but...  I'm hoping there is a better solution.

 

Thanks,

-M


Viewing all articles
Browse latest Browse all 66852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>