Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

save Excel file

Hope sombody can help me!
I want to save an excel file everytime I make a new measurement with an CString from a textfield. At the moment I want to do it as follows:

book.saveas(COlevariant("c:\\file\\file\\*.*"..)

At *.* I want to add the new adress. How ist it Possible?

regards

Stefan
0 Kudos
Message 1 of 2
(3,118 Views)
If you want to save the whole project as a new name each time this should work.

CString String1;
CString String2;
int file_count=0;

String1.Format("C:\\file\\file\\basefilename");

while(keep_taking_measuremnts == true)
{
if(measurement_taken == true)
{
String2.Format("%s%d.xls",String1,file_count);
file_count++;
book.saveas(COlevariant(String2,....
measurement_taken = false;
}
//rest of code in measurement loop


}

This would give you basefilename0.xls, basefilename1.xls,basefilename2.xls etc.

Grant
Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 2 of 2
(3,118 Views)