ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

spreadsheet string to array

Hi All
 
There is a spreadsheet file which can be open by Notepad or Excel, it is made using LabVIEW "Write to spreadsheet string.vi".
 
I need to open it in .net using C#, is there any method like "Read from spreadsheet string", the return should be a "string[ ][ ]".
********************************
*The best Chinese farmer*
********************************
0 Kudos
Message 1 of 3
(3,473 Views)
Measurement Studio does not include any .NET libraries for reading Excel files. Microsoft provides a couple of good options for using Excel files from .NET.
 
  • Use Visual Studio Tools for Office and access the files via the Excel ActiveX Automation API. See this link for more information.
  • Use ADO.NET and acess the files as a database data store. See this link for more information.

 

0 Kudos
Message 2 of 3
(3,467 Views)

Hi drohacek

Just I need to convert a spreadsheet string in which "\t" and "\n" are indicate element and dimension.

0.60405 0.79069 -0.09969
0.65965 0.72323 -0.20446
0.69607 0.64635 -0.3126

It should be understand like this, a long string.

0.60405 \t 0.79069 \t -0.09969 \n
0.65965 \t 0.72323 \t -0.20446 \n
0.69607 \t 0.64635 \t -0.3126 \n

I wonder how to read above data from a txt file which is made by LabVIEW and transfer them to a string[ ] [ ] or a double[ ] [ ]..

Anyone has other method? Or better ideas.

 

********************************
*The best Chinese farmer*
********************************
0 Kudos
Message 3 of 3
(3,454 Views)