LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Advise using CVI and excel

Hi RobertoBozzolo,

I saw you gave a lot solutions of the CVI in the forum. i met a question of using the CVI. Can you give me some advises?

i use the cvi to send a string to the Excel for calcul the value. For example, i use this :

ExcelRpt_SetCellValue (ExcelWorkSheetHandle, "B3", ExRConst_dataString,"=5*3+SIN(30)"); 

And then i got a resualt of the calcul valres = 14.01 with the after code:

ExcelRpt_GetCellValue (ExcelWorkSheetHandle, "B3", ExRConst_dataFloat, &valres);

 

But the condition is i have to install the Microsotf Excel in the windows first. And then i can use the CVI COM to call the Excel  to deal with my formula (Microsoft Excel 9.0 Object lib AND Excel Report).

So, for the PC which didn't install the Excel, what can i do for my calcul string like "=5*3+SIN(30)" ??? Can someother lib replace the Microsoft Excel 9.0 Object lib?

 

Thank you so much!

0 Kudos
Message 1 of 3
(2,936 Views)

If the formulas are similarly simple, as the one given in your post, then you can parse them in your code and calculate the result without any other external program.

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 3
(2,888 Views)

I second ebalci in his response: with functions included in both standard C and CVI libraries you have a powerful set of instruments to perform mathematics on your data. Unless you wnat to access some very specific Excel function there is no need to use that instruments to perform calculations, and even more since, as you already observed, you need Excel to be installed on the machine to access it.



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?
0 Kudos
Message 3 of 3
(2,869 Views)