LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Spreadsheet Files to Excel

Hi,
I have a VI which records data to a text file in spreadsheet format. At
present to get this data into Excel I am opening the file and cutting and
pasting. I want to be able to do this within labview at the press of a
button. I have altered an example VI which allows me to do this. The only
problem is this VI opens the file, writes all its values to an array, opens
excel then uses two for loops to write each cell to an Excel file. This is
very slow. How can I cut and paste the file to excel using labview? Any
help would be greatly appreciated.

Regards,
Martin.
0 Kudos
Message 1 of 3
(2,522 Views)
Hi Martin.

You can pass a 2 dimension array of values to the VALUE method of the Excel ActiveX control. Once
you have selected the workbook and sheet, select a range using the CELL1, CELL2 property (Office
2000). Provide CELL1 for the top left cell and CELL2 as the lower right cell of your arrary. The
transfer using this method is instantaneous!

- Michael
--
Michael Munroe Mailto:mmunroe@abcdefirm.com
A Better Complete Development Engineering Firm
San Mateo, CA 94403 http://www.abcdefirm.com

Martin Stanley wrote:

> Hi,
> I have a VI which records data to a text file in spreadsheet format. At
> present to get this data into Excel I am opening the file and cutting and
> pasting. I want to be able to do this within labview at the press of a
> button.
I have altered an example VI which allows me to do this. The only
> problem is this VI opens the file, writes all its values to an array, opens
> excel then uses two for loops to write each cell to an Excel file. This is
> very slow. How can I cut and paste the file to excel using labview? Any
> help would be greatly appreciated.
>
> Regards,
> Martin.
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 3
(2,522 Views)
Hi Martin
you should try this example:
http://www.easymacro.com/demos/ExcelChartCustomized.zip
it's a different approch to the problem that is you don't bother with ActiveX
but you just act with Macros. Or send the question to them (http://www.easymacro.com)
and they will do it for you.
Regards
Rick

"Martin Stanley" wrote:
>Hi,> I have a VI which records data to a text file in spreadsheet format.
At>present to get this data into Excel I am opening the file and cutting
and>pasting. I want to be able to do this within labview at the press of
a>button. I have altered an example VI which allows me to do this. The
only>problem is this VI opens the file, writes all its values to an array,
opens>excel then uses two for loops to write each
cell to an Excel file.
This is>very slow. How can I cut and paste the file to excel using labview?
Any>help would be greatly appreciated.>>Regards,> Martin.>>
0 Kudos
Message 3 of 3
(2,522 Views)