03-20-2012 07:06 PM
I downloaded the 30 day trial of the MS Office toolkit in hopes that I can find a way to put data into an existing Excel file and read data out of that same file. I've been reading the help files and I'm lost. I want to do something REALLY simple, which is write a column of data from my vi into an existing Excel spreadsheet at a designated beginning row & column, then read 1 cell back into my vi from a designated cell reference. Nowhere in all the help files do I see a way to provide a file name and path for the existing spreadsheet. I'm VERY proficient with Excel, but this toolkit, help files and the vi's provided are very confusing.
03-20-2012 11:00 PM
This should be posted to the LabVIEW forum. This is a social forum, so you are more likely to get a timely answer there.
03-21-2012 09:10 AM
er last time i looked this is the labview discussion board. If you can use a csv file it is much easier. Either way look through the examples they can be very helpful and you can use them as is or tweak them to your needs
03-21-2012 02:42 PM
CSV is not an option. I MUST work with EXISTING Excel files. I looked at ALL of the MS Office Toolkit vi's made for Excel and find NOTHING that allows me to write a column of data or a CELL of data to an existing Excel file. I can write a 2-dim array, or I can write TEXT, but no way to write, for example, trace data from a network analyzer. Seems like a significant omission, or else I'm missing something.
03-21-2012 03:16 PM - edited 03-21-2012 03:18 PM
@Akiel wrote:
er last time i looked this is the labview discussion board.
The post had initially been in the Breakpoint forum.
To OP: To open an existing workbook use the New Report VI and provide the name of the Excel workbook for the "template" input. You can then overwrite the file when you save the report by providing it the name of the existing workbook.
EDIT: Forgot the other half. To add your data, you can use the Excel Easy Table VI to place your data at a specific location.
03-21-2012 03:59 PM
And there is no need to SHOUT.
Since you are a LabVIEW beginner, you need to understand some fundamentals about arrays. Just because the input is a 2D array, that does not mean you cannot insert a single row, column, or cell. You can convert a scalar or a 1D array into a 2D array with the Build Array function. Leave as is for a single row. Transpose for a single column.
03-22-2012 12:51 PM
Dennis, I'm quite familiar with all the fundamentals of arrays. Yes I can manipulate my data as you suggest to prepare it to be used in the "Excel Specific" toolkit, which I maintain is a gross misnomer in that the tool isn't consistent with the most basic Excel operations, as we just discussed. I would expect if it's Excel Specific it would readily accept column and cell data w/o external modification, AND I would expect cell references to be Excel consistent, using rows numbered from 1 and columns with letters instead of the Labview standard array base 0 references. It also wasn't obvious that the input labeled "Template" is where one creates the filename and path for the Excel file name that is being opened for reading data. These details are sorely lacking in the help files.
03-22-2012 02:11 PM - edited 03-22-2012 02:12 PM
Personally, I think the help for the Template input is pretty clear.
As far as the row and column numbering, I can see your point as an Excel user. As primarily a programmer, I have never liked microsoft's decision to use letters as column headers, though.