LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Spreadsheet to String Array on another worksheet

Solved!
Go to solution

hi,

is it possible to write spreadsheet to string array but to an added worksheet?

I am currently writing results to the worksheet, but i want to create another worksheet so that i can put the raw data in.

is it possible?

if so, how?

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 1 of 29
(5,154 Views)

In your image you are reading from a spreadsheet, but you talk about writing.

 

What is your definition of a "worksheet"? It is not clear at all from your post.

Message 2 of 29
(5,144 Views)

Sorry,

i guess i attached the wrong picture.

i currently have this.

I read from a spreadsheet.

and analysis certain row and column, then do calculation and write the results to a new spreadsheet.

it is working fine.

but as an option. i wanted to "read all the data from the spreadsheet as the previous image" and then write those data to the same new spreadsheet file but in a different worksheet.

 

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 3 of 29
(5,118 Views)

untitled.PNG

 

So i created a file called results_100603.csv

i want to create a worksheet in that file call Raw Data and copy all the data I read from the file into that worksheet.

 

Best regards,
Krispiekream
0 Kudos
Message 4 of 29
(5,113 Views)
Solution
Accepted by topic author krispiekream

You can't unless you start using ActiveX functions or the report generation toolkit to communicate with a real .xls spreadsheet file.

 

You are reading and writing a text file that is formatted in a spreadsheet-like manner with delimiters separating values in a row, and lines of text from each other.  Text files have no understanding of data being on one "worksheet" and other data being on another.  That is a special feature of the proprietary Excel file format (and other spreadsheet programs as well) that allows Excel to know which data to put on which worksheet.  It's not the kind of information you can pass along using the text based File I/O functions of LabVIEW.

Message 5 of 29
(5,110 Views)

To simplify what Ravens Fan is saying, the Write to Spreadsheet File function does not write to an Excel spreadsheet.  It writes an ordinary text file.  To write to an Excel spreadsheet, where you can have different worksheets, you need the Report Generation Toolkit for Microsoft Office, available at your local NI distributor for a hefty sum.

 

- tbob

Inventor of the WORM Global
Message 6 of 29
(5,097 Views)
You can find numerous links for reading/writing Excel by searching the forum, as well as perusing the links in the Excel thread. NOTE: DO NOT POST QUESTIONS IN THE EXCEL THREAD. It is a thread for links only.
Message 7 of 29
(5,096 Views)

tbob wrote:

To simplify what Ravens Fan is saying,


I thought it was pretty simple to understand in the first place. Smiley Very Happy

Message 8 of 29
(5,094 Views)

oh boy.

i know that i need to use activeX.

but i just dont know how to do it.

where can i go to learn activeX.

i went through the excel threads and have created a new worksheet.

but i am having problem writing to that worksheet with my raw data.

 

Best regards,
Krispiekream
0 Kudos
Message 9 of 29
(5,088 Views)
Have you looked at the "Write Table to XL" example that ships with LabVIEW?
Message 10 of 29
(5,073 Views)