12-02-2013 08:48 PM
hi.
i just want to save the real-time collecting data to excel automatically ,but no need to open the excel
" ExcelRpt_ApplicationNew (1, &appHandle);' will open the excel
Is there way to connet to excel?
Thanks .
Solved! Go to Solution.
12-03-2013 12:26 AM - edited 12-03-2013 12:26 AM
No way: to write directly to Excel you must have the application running. What you can do is to pass '0' as the first parameter to the function to make Excel not visible: this is desribed in the help for the function.
12-03-2013 01:05 AM
thanks for your reply .
i have another question, how can the cell's number increase automatically.(forgive my poor english)
for example:
for(i = 0;i < m;i++)
cells'number = A1 ++;
i know this doesn't work, but i didn''t find any functions can do it ,did i miss something.
12-03-2013 09:10 AM
All cell ranges in reading/writing functions are strings in the form "A1:B5"; you must manually create the string in the loop, for example this way:
for (row = 1; row < numRows; row++) { for (col = 1; col < numCols; col++) { sprintf (range, "%c%d", col + 64, row); } }
Be careful if you have more than 26 columns: the range must be in the form "Z1:AA2"