11-01-2014 04:01 AM - edited 11-01-2014 04:03 AM
Hi
I found a block for insert new row in excel, but there is no input for data input. how should I insert data by this block to excel file? can you help me?
that block name: Excel insert cells
in report generator toolkit
Best Reagards
11-01-2014 04:44 AM
You can use the excel specific commands to easily manipulate excel, but still use the general report VI's to add data.
http://digital.ni.com/public.nsf/allkb/E97C9BEF7E53841E86256A41004F0809
You can insert cells and worksheets using the excel specific VI's but use the append data to report vi and add the data to the specified cell. Make sure in the new report.vi you reference your current report as the template and choose excel as the formatting. I was able to just mess around and insert some cells, then add data to them. I actually did not even necessarilly have to insert any cells to add data to a specific location, it simply lets you have access to the excel commands programmatically.
11-01-2014 06:59 AM
I could work with Excel insert cell block, but when I want add new data to an old row continuation, last row shift downward! while I want add data to old row. anyone can help me?
11-01-2014 07:55 AM
behzad1 a écrit :
I could work with Excel insert cell block, but when I want add new data to an old row continuation, last row shift downward! while I want add data to old row. anyone can help me?
Nobody will be able to identify the problem without seeing your code. Excel Insert Cells.vi is used to add cells to an existing spreadsheet, not to set the cell value. To do this is a more specific way than the Append Report Text.vi you can use Excel Easy Text.vi or Excel Insert Table.vi. With these vis you can specify the range where you want to insert something.
For your other question (Two different data types) you can use the Excel Set Cell Format.vi to format a range as a date or something else. You will need to use the Excel format specifiers for this.
Ben64