LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to transfer 1d and 2d file into 3d write to worksheet file

So I'm currently working on writing a separate 1d file and a 2d file and would like to write these values into an excel worksheet.  I tried to use 2 'Write to Spreadsheet File' and was hoping that the first 'Write to Spreadsheet File' that was writing the 1d file would be erased the program wrote the second 'Write to Spreadsheet File' (writing the 2d file).  Is there anyway I can do it the way I'm trying to do it now?  Thanks.

 

Jon

0 Kudos
Message 1 of 9
(3,978 Views)

Just realized that I didn't attach the image of the block diagram.  Here is an image of what I am talking about.

0 Kudos
Message 2 of 9
(3,974 Views)

I'm not sure what you are trying to accomplish.  The second write should overwrite the first one since "append to file?" defaults to false.  So your 1D array is being overwritten as soon as it was saved to disk.

 

BTW, look into the Build Path instead of your convert to string, concatination, and convert to path in order to build the file's path.  Just trying to save you a little effort.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 9
(3,965 Views)

I was hoping that the 1d file would NOT be erased when I wrote the 2nd 2d file into the 'Write to Spreadsheet File'.  Unfortunately, this is what happened and I'd like to know if any of you know if there is a way I can save that first column (not get it erased) when i write the 2d file which would start at the 2nd columns.  Sorry for the confusion.  Anyone have any ideas?  Thanks!

 

Jon

0 Kudos
Message 4 of 9
(3,963 Views)

You would have to combine the arrays in order to do that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(3,959 Views)

adding it to the bottom is a piece of cake... just append.

 

TO add more coolumns you will have to read a line from the first, append to that line the additional data for that line ...

 

and continue till you have it all written.

 

There are other methods (read transpose add re-transpose) but none that are straight forward.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,952 Views)

Do you want your time and data points formated the same?  You picture has both of them formated as "%.4f".  It seems a little weird having integers formatted with 4 0s behind them.  If you want as is, this should work for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 9
(3,949 Views)

@crossrulz wrote:

Do you want your time and data points formated the same?  You picture has both of them formated as "%.4f".  It seems a little weird having integers formatted with 4 0s behind them.  If you want as is, this should work for you.


 

"what he said"

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,939 Views)

thanks for your help guys.  I'll give some of your ideas a try. 

 

@ Crossrulz - Thanks for the diagram.  I did try your schematics but my labview apparently does not like it because it kept crashing my labview...

 

Thanks!

0 Kudos
Message 9 of 9
(3,933 Views)