DATA AHEAD toolkit support Discussions

取消
顯示結果 
搜尋替代 
您的意思是: 

Extra line added (We need a "write row" function)

已解決!
前往解決方案

It's been a while since I used XLR8. I have attached a sub-vi that opens a file, creates the sheets, and writes column headers.

When I run this I see it is putting an extra line in and placing the headers on line 2 instead of line 1 on the empty sheet.

I am guessing because we only are given a choice of writing one cell at a time or writing an area that requires a 2d array input.

As you see I use build array to make the 1d array into a 2d array. Could this be where the extra line is coming from?

I have to say 99.9999999% of the time when writing data files I am writing a 1d array of values to a single line in a data file.

Please create a Write Row and/or Append Row function that will accept a 1d array input of any type and write it to the next row (append) or specified row (Write) with programmable start column but default to starting at column 1.

========================
=== Engineer Ambiguously ===
========================
下載全部
0 積分
1 條訊息(共 6 條)
8,829 檢視
解決方案
由主題作者所接受 RTSLVU

Thank you for your feedback.

If you use the function 'Append Area' the tool checks the last row number and increases it by one. If the sheet is empty the last row function returns 0. So writing starts at line one.

Next version we will fix this bug so that writing starts at line 0 if the sheet is empty and we will think of adding the functions: ‘Write Line’ and ‘Append Line’.

For now please use the function ‘Write Area’ for the first line

0 積分
2 條訊息(共 6 條)
8,193 檢視

Thanks, I did not realize I grabbed the append not the write.

Also thinking about my request for a "write row", take a look at the Write Delimited Spreadsheet.vi (LV2015)

It has both a 1d and 2d input, but you can only use one or the other.

Why not make the write and append vi's in XLR8 work like that?    

========================
=== Engineer Ambiguously ===
========================
0 積分
3 條訊息(共 6 條)
8,194 檢視

Speaking of "Line 0", there is no line 0, Excel starts with "Line 1" and "Column A"

If I want to write to line 2 column C would that be line 2 and column 3 or line 3 and column 4?   

I am guessing line 2 column 3.          

========================
=== Engineer Ambiguously ===
========================
0 積分
4 條訊息(共 6 條)
8,194 檢視

Maybe this is a bit confusing:

First cell in Excel is Line 1, Column A.

The indexes of out tool starting at 0. So first cell with XLR8 is Line 0, Column 0.

5 條訊息(共 6 條)
8,194 檢視

Thanks, I figured that out. It's been a long time since I have use XLR8 and now I am beginning to remember all the little annoynces it has.

For instance "Get Last Row" returns a value based on the first line being 1 not 0 so to actually get the last row for formating a column or writing an area you need to add 1 to the output of Get Last Row.

It would be nice if XLR8 was consistant with the first row or column being 0 or 1.

========================
=== Engineer Ambiguously ===
========================
0 積分
6 條訊息(共 6 條)
8,194 檢視