I have hardware for which I get 30 data points. Each of these points is written to the spreadsheet in several different places before the sheet becomes visible, then another program takes the top Excel spreadsheet. All these values ββare required to be written to the spreadsheet before another program moves to another. If I write each cell individually, the recording takes about 50 ms, which takes about 1.25 seconds to complete the data collection.
If I could write all the values ββin a table at a time, I feel that it will greatly speed up the writing of all these cells. The problem that I see is that ranges work very well for updating adjacent cells, where, since my data is not adjacent. Essentially, this will be an example of what I want to write:
A1 = 1
B23 = a
F8 = 2012/12/25
D53 = 4.1235
B2 = 5
I tried to create a range of "A1, B23, F8, D53, B2" and then set the values ββusing an array of values. I tried 3 different arrays: object [5], object [1,5] and object [5,1]. All of them set the values ββof the specified cells in the range up to the first index of the array that I created in all cases.
Is there a way to update data from 30 cells without repeating through the cells one at a time?
Thanks Tom
c # excel sparse-matrix range
bunggo
source share