LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write/read 2D array of Sting in Excel sheet using labview 7.0

hi,

 

 pls guide me... i want to write 2D array of string and number in excel sheet in labview 7.0... 

but write to spreadsheet not taking my 2d array of string and number.

 see the attachment...

im using labview 7.0.. 

if using any other higher version than labview 7.0 means.. tell me to do the program with snapshot...

 

waiting for help...

Regards,
N. Srinivasan
0 Kudos
Message 1 of 14
(12,251 Views)
Go to the block diagram of Write to Spreadsheet File. There are directions there on what to do to make the VI accept arrays of strings. Save the modified VI with a new name and in a new location.
Message 2 of 14
(12,236 Views)

 

 

hi dennis,

  thank you for ur help...  i thought i cant go to front panel and block diagram of write/read spread sheet... after your useful information i edited write/read spread sheet.

 

 

i have one more doubt that is... manually i'm typing some data in excel sheet as name is ****.xls.... then im giving  path as same excel sheet as ***.xls... but read from spread sheet giving some juke character... 

whether excel sheet to be write only through labview only open in read from spread sheet???? is it..

 

if not tell me how to do....

 

pls see this attachments....

 

 

Regards,
N. Srinivasan
Download All
0 Kudos
Message 3 of 14
(12,203 Views)
Hi

when read from the xls file that you created from write spreadsheet file vi
the xls file generated is not in the same format if you have created it manually from excel.

So you cannot read it from read spreadsheet file vi.

Reason :

Formatting and features that are not transferred in Excel file format conversions
The Microsoft Excel Workbook file format preserves all worksheet and chart data,
formatting, macros, and other features available in Excel 2003. If you save an Excel
2003 workbook in another file format, some of the formatting, data, and other features
might be lost. For more information about compatibility, see the Microsoft Office 2003
Resource Kit.

+

see the attched image.

For further explanation search on net.


If your final task is to read excel file. You can use the activex component.

The example is attached below.

Regards,
Download All
0 Kudos
Message 4 of 14
(12,190 Views)

hi,

 

dont mistake me im not clear now also..  Are you telling that manually typing data in excel sheet will open in read from spread sheet.. 

 

then im using labview 7.0... can  u save your example program in labview 7.0..

im doing a project that user should type the PCB name in excel manually so that read from spread sheet will read the excel data and do the further process..

 

each and very time i cant run the write to spreadsheet for updating the excel sheet for PCB name..

Regards,
N. Srinivasan
0 Kudos
Message 5 of 14
(12,185 Views)

hi i dont have the intermidiate version so i cannot convert it,

 

if do manuallly then you ll not be able open by read spreadsheet vi

 

use the ex or search the forum many ex are given in regards to excel.

 

 

0 Kudos
Message 6 of 14
(12,162 Views)

Hi Srinivasan:

 

Please check the attachment. I try to save VIs into LabVIEW 7.0 version. Both VIs might be fulfil your requirement. If you have to add more functions which would be deal with Excel then you have to work on ActiveX Control. Let me know if you have problems.

 

Thanks

Viral Patel

0 Kudos
Message 7 of 14
(12,126 Views)

 hi viru,

 

 thank you for your kind response.... dont mistake me my question is i'll create excel sheet with data will be type manually and i'll saved the excel sheet. then what im going to do is i want to open the excel sheet with labview software ie read from spread sheet or some other tools....

 

one kind request is im using labview 7.0 pls saved in labview 7.0..

 

i cant open ur write to spread sheet .vi 

 

but i can open read 2Darray.vi... but the juke character is coming in 2d array string output 

pls see this attachment...

 

the excel sheet(railway pcb name.xls) the data inside was typed manually and saved i want to this data....

Regards,
N. Srinivasan
Download All
0 Kudos
Message 9 of 14
(12,087 Views)

Hi Srinivasan:

 

Please check the attached file. Save it in your system. After that follow the belowe steps:

 

First Step:

Run "Write 2D Array Into File.vi". After done that you can see one .xls file in your c: drvie (Location : c:\Railway_PCB_Name.xls).

 

Second Step:

Run "Read 2D Array From File.vi"

It reads the file which is generated by Write 2D Array Into File.vi

 

Now you try to read Excle file directly using Read 2D Array From file.vi which is not appropriate. If you read excel file data you have to use actvieX control for MS Office Excel.

 

Let me know the status of VI.

 

Thanks

 

Message 10 of 14
(12,075 Views)