06-23-2016 09:41 AM
problem as fellow ,please give some suggestions!
06-23-2016 10:40 AM
Excel has no way to write out a 3d (> 2D) array. We can't see the code off to the left but I suspect that somwhere over there, you have an array that has more than two dimensions. You can resize the array, if that will make sense for your data. You can trim off the excess dimensions of the array (again if that makes sense for your situation).
06-23-2016 10:50 AM
A 3D array is an array of 2D arrays. The way this would look in excel if you wanted multiple 2D tables, is you would have multiple tabs with each tab containing a 2D table. You can't do this the way your code is set up, but you can create new tabs and write the 2D arrays to each tab.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-23-2016 10:54 AM
Yes you are right .my array is data from tdms file that has a group name T and only chanel Time,,the datatype is datetime,i find it 1D array,but there is a error says more than two dimensions.
06-23-2016 10:58 AM - edited 06-23-2016 10:58 AM
Sooo.... do you need help fixing your code so that you are only building a 2D array to write to file? Because it sure seems like you're trying to write 3D. If so, you need to share more information, most importantly your code. Please include a Snippet of your code, or attach your VIs..
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-23-2016 11:12 AM
I fetch data by use a offset and sise(lehgth) from tdms,there just one chanel,so one coll logically i think,why more 2D,i will give you the code tomorrow,thank you again.is there a way can reduce dimensions?
06-23-2016 11:15 AM
_Also i find the 1D array data from tdms automatically have indexes
06-23-2016 11:17 AM
@Skywalker008 wrote:is there a way can reduce dimensions?
This depends greatly on how your 3D array is being generated. Logically, yes, if you are pulling in 1 channel, it is strange that you are getting a 3D array, soy uo must be doing something that you don't realize. This could be a simple case of auto-indexing out of two nested For loops. Really, we can't tell what you're doing without the code, though.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-23-2016 08:48 PM
It is the code-- Desktop.rar