From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-26-2012 04:04 PM
Hi all;
So i've a project to finish ASAP, but i still bloqued;
Actually i've to read data from a com port and then to load these informations in an excel file means that i'll create and then generate an excel file;
i still bloqued on excel, no advancement on that point,
Can some one help me;
Thks by advance;
Kindest regarda;
Solved! Go to Solution.
04-26-2012 11:51 PM
CVI comes with an interface to Excel (as well as other programs that can communicate via ActiveX). You can search the sample program via the example finder: just looking for "Excel" should point you to the correct sample (it should be located in <sample program folder>\activex\excel or something similar: I cannot verify at the moment as I don't have CVI installed on this machine).
The sample program demonstrate various ways read/write data in an Excel sheet and should give you a framework for you to develop your own application. Please note that full Excel program must be installed on the target machine (no possibility to link to Excel starter edition, as it lacks the ActiveX interface).
04-27-2012 12:11 AM
Forgot to say that there is also a "Escel report" instrument that you can find within CVI installation: it is built on top of the previous module I mentioned so I normally don't use it but you may want to search documentation about it and consider to use it.
Don't forget to look in the forums as well as NI support site, where you can find a lot of resources and documentation about this argument.
04-30-2012 03:01 PM - edited 04-30-2012 03:02 PM
Please study the sample project "excel2000dem.prj" come with your LabWindows/CVI, especially the functions "LaunchApp(...)", "NewAppFIle(...)", "SaveAppFile(...)", "WriteDataToExcel(...)", and "ShutdownExcel(...)" in "excel2000dem.c" file. You'll gain a lot of insight for using Excel with CVI to achieve what you want to do. Let us know if you encounter any problem.
12-21-2012 03:21 AM
So, i'm back;
I stil not sliving that project...
I need to create an escel file containing many sheets, and every seceont i've to verify if it exists or not:
if no i've to create it, if yes i've to open it to write datas ...
I succeed to create that file and wirte data s wanted, but with files functions means fprintf, fscanf ..., but the problme here that i can't succeed to create many sheets, if i can do it it'll be perfect
12-21-2012 03:43 AM
Is there some one here??? Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
12-21-2012 05:29 AM
ouppssssssssssssssssssssssssssssssssss,
Think there's no one to help;
Have to still thinking alone
12-21-2012 06:19 AM - edited 12-21-2012 06:20 AM
Hello touha,
you already had some suggestion from dcl9000 and myself about this problem. CVI comes with a great Excel example that may give you a basic framework from which to start developing your application.
Have you tried looking at it? Did you find any specific problem in using it?
There are alco several forum threads that address communication with Excel that you may want to search.
Regarding the presence / absence of the file, you can use FileExists () function from the Programmer's Toolbox.
12-21-2012 06:30 AM
2548976512554 thanks best ROberto
Ok for the (fileexists), i've already use it for te example i develop using the file's functions,
Honestly, i look for excel examples, but he biggest bloquant pt is how to identify the wanted file (if u look all excel functions don't let u specify a specific file name...);
Looking my modest knowledge about excel functions on LBw, i can't advance any more
But, let us back for file's functions, i can't cearte excel file with many sheets????
Hope u can sunshine some light on that issue
12-21-2012 06:46 AM
Take a look at excel2000dem example: the function openAppFile shows how to open a given existing file, specified in fileName variable:
// Open existing Workbook GetProjectDir (fileName); strcat(fileName, "\\exceldem.xls"); error = Excel_WorkbooksOpen (ExcelWorkbooksHandle, NULL, fileName, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, &ExcelWorkbookHandle);
Just to be clear, the example we are referring to is this one.