DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you transfer the actual data from Diadem to Excel

Using Diadem as an OLE server, how would you transfer for example: Ch(1) to ExcelSheet.Range("B5:B1700")? Do you have to do it one value at a time or can you do a block transfer?
0 Kudos
Message 1 of 6
(4,378 Views)
You can copy a whole diadem channel (or only a part of it) into the clipboard and then paste it into a selected area of excel. You can open the excel-application from diadem. Then open a worksheet, select a cell and paste the channelcontent you have copied before.
0 Kudos
Message 2 of 6
(4,378 Views)
The DIAdem.ToDatasheet offers functions to export an data area (ValueRangeGet and ValueRangeFormatedGet). This allows you to store all data of a certain area in vector variables.
Unfortunately it seems that Excel does not support a similar method to set a data area. Allthough you can mark a range to change properties of a number of cells at the same time I think you will have to set the value of each cell individually.
I found some lines in a vb-example that might help you:

'Add data to the spreadsheet. The data is input to Excel one point at a time,
'by going stepping through the array one point at a time, and placing it in
'its assigned cell. The cell location is determined by converting the column
'index of the array into an a
scii value, and adding 65. So the first column
'of data fills to the ASCII equivalent of 65, which is "A". Note that this
'is only valid for columns A through Z, but since data acquisition rarely
'takes place on more than 16 channels, the limit is not restrictive.
For x = 0 To numchannels
For y = 0 To numscans
.Range(Chr(x + 65) + CStr(y + 10)).Value = ScaledData(x, y)
Next
Next
Message 3 of 6
(4,378 Views)
Thanks d.s. , I feel like I should have known that.
0 Kudos
Message 4 of 6
(4,378 Views)
This is the correct procedure to implement this data transfer.
Diego Reyes
Applications Engineering
National Instruments
0 Kudos
Message 5 of 6
(4,378 Views)
Thanks, this works, although the data loads rather slowly but I can live with that.
0 Kudos
Message 6 of 6
(4,378 Views)