LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cvi :how can i save datas to EXCEL automatically

Solved!
Go to solution

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 .

 

0 Kudos
Message 1 of 4
(3,975 Views)
Solution
Accepted by topic author shayisi

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(3,966 Views)

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.

 

0 Kudos
Message 3 of 4
(3,957 Views)

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"



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 4
(3,942 Views)